Certainly that Scripture as all Scripture is quite true.
However, there are other Scriptural indications that this whole life is a test, training etc.
And, of course, there’s the case of Job.
I think there are myteries and complexities on the issue that are difficult to sort out and articulate.
Job is a story that tells us never to blame God for our misfortunes, not a test.