Learn how to test the endpoints for loading existing and non-existing products.
We'll cover the following
Load a non-existing product
Load an existing product
Loading all products
If no products exist
With existing products
Load a non-existing product
Let’s write a test for our first use case: loading a product!
Again, we will use the beforeEach and afterEach helpers to clean up our database. Let’s take a look at a test for loading a product that does not exist.
Learn how to test the endpoints for updating a non-existing product, an existing product and updating with a garbage value.
We'll cover the following
Garbage values
Updating an existing product
Updating a non-existing product