Loading

Let’s write our first controller middleware unit test by mocking out a database call and verifying that the database is interacted with correctly and the response is sent correctly.

Transcript

Write a Unit Test for a Controller by Mocking the Database