Surah Al-A'raaf, Verse 168
Translation — Sahih International
And We divided them throughout the earth into nations. Of them some were righteous, and of them some were otherwise. And We tested them with good [times] and bad that perhaps they would return [to obedience].
Source
Kur'an-ı Kerim, A'râf Suresi 7:168
https://kuran.diyanet.gov.tr/mushaf/kuran-meal-2/7-suresi-168-ayet