I keep remembering the children of Israel in the Old Testament, who learned (sort of) to trust God in the bad times, but who wandered away after false Gods and loose living when the good times came.
Thinking it over, I remembered reading a remarkable recent article by Victoria Boyson, where she discusses just this question.
"Rejoice always; pray without ceasing; in everything give thanks; for this is God's will for you in Christ Jesus" (1 Thessalonians 5:16-18). A person with a thankful heart is a person of great power. A thankful heart is a victorious heart, which sees victory in the face of defeat.
In the course of battle, we can often get frustrated and find ourselves wrestling with God instead of contending the mountains in our lives. Through our frustration we end up rebuking God, instead of rebuking principalities and powers. We can get caught in the cycle of complaint with God concerning how long it is taking Him to meet our need; instead of thanking Him for all that He has already done for us. Our unhappiness can keep us continually seeking explanations from God, instead of thanking Him for the mountains He has already moved and the seas that He has parted to get us this far.
How soon we lose sight of all the miracles He has performed to bring us the victories we have already been given. While waiting for God to do the "big" thing for us, we forget to be thankful for the little victories along the way. I believe the small blessings we receive from God are a special test of our heart; He wants to know if we will be thankful even for the smallest gift.
On the other hand, Satan wants us to become dissatisfied with the victories God has given us, for a dissatisfied heart is easy for him to manipulate. When we are frustrated, he can get us to do and say things we would not otherwise and attitudes can develop that hurt our faith. Jealousy and selfish ambition are both rooted in an ungrateful, dissatisfied heart. For a dissatisfied heart is like a hunger that is never filled, or a fire that never dies out. If we allow it, it will eat away at the enjoyment we find in this life...
Our thankful heart will produce an honest and accurate view of God. We will see that He alone holds the world in the palm of His hand, and that He alone is the creator of all things. As this awesome God blesses us everyday, we simply need to take the time to renew our minds by thinking of the blessings and victories He has given us. When we do this, we enlarge our capacity to believe in Him to do even greater things, and then we will trust Him more and lean more on the power and authority He has given us...
Victoria Boyson, 'A Heart of Thanksgiving'
If giving thanks to God even in the bad times opens the door to God's blessings, how much more will we be able to trust God if we can remains thankful in his blessings? After all, they are his blessings, not ours, and in offering them to him in our thankfulness, we are, in the words of the liturgy, giving him of his own.