Imaam Ibnul Qayyim [rahimahullaah] said: More than one person has said to me:
[ إذا تبت إليه–When I repent to Him (i.e. Allaah); [ وأنبت – and turn to (Him) in obedience, avoiding disobedience, depending on him and seeking refuge in Him] and performing righteous actions; my sustenance is straitened and difficulty comes upon my livelihood. However, when I return to disobeying Him and give my soul its desires, then sustenance, relief and other than it comes to me.’’ So I [i.e. Ibnul Qayyim] said to some of them: This is a test from Him [i.e. Allaah] to see whether you are truthful or untruthful in your seeking refuge with Him, responding and submitting to Him in obedience and exercising patience upon (what He has decreed of afflictions for you with absolute justice and wisdom) so that there are (good) end results for you; or whether you are untruthful so that you return to what you were upon (of evil).
[Source: Ighaathatul Lahfaan: 2/921]