missed period, waiting three hours!

Leah
I've already waited 3 hours but I forgot I couldn't eat or drink and I ate about an hour ago can I still take a pregnancy test and get an accurate result?