The video for this lesson is currently being updated, please read the transcript instead.

Checking database

This unit test would be more robust if we not only checked the HTTP response, but we also checked the database to ensure state has been modified as we're intending.

Clearing the database

The database contents will obviously persist across tests, which makes it unpredictable. For this reason, we should make sure the database is cleared before every test runs to ensure that pre-existing data doesn't interfere with our tests.

To view the complete lesson you'll need to login or join this course.


Click to load comments...