In this episode, we shake things up a bit and look at how to properly verify that something we've created (like a task) actually exists in the database—not just on the page. First, we go over why, in a typical redirect flow (like after creating a task), seeing the new task listed is usually enough to confirm it’s there since the list is generated from the database.
But what if our app doesn't redirect us to that listing page after creating a task? Maybe it just shows a quick success message. We show how relying on just that message can make our tests brittle—especially if the wording ever changes. So, we tweak our test to also check directly in the database to make sure the task was actually saved.
We demo how to assert database contents in your test code, discuss where to place these assertions (inside or outside the browser flow), and explain why it's important for robust testing. By the end, you'll see not just how to verify UI feedback, but how to confidently confirm that the data is really there behind the scenes too.