Unit Tests for Products Routes Part 3
Learn how to test the routes for loading and creating products.
We'll cover the following...
We'll cover the following...
Create a product
Before we work on our Products Routes tests, we need to adapt the code to create a product using the knowledge we gained from our Product Route update test.
Garbage values
Moving on to our tests: We will start with sending garbage JSON via the POST request.
There is nothing special here. The test is the same as for the Product Routes except for the changed URI and HTTP method. The code is also a bit ...