Testing the Routes: Use Case - Saving
Explore how to test HTTP routes in Scala focusing on product saving scenarios. Understand handling invalid garbage data with proper error responses, managing attempts to save duplicate products, and successfully saving valid products. This lesson teaches you how to verify API responses and database integrity through unit and integration tests.
We'll cover the following...
We'll cover the following...
Garbage value
We’ll continue with the use case of saving (or creating) a product via the API. We are going to generate junk data to test our APIs.
Here, we test posting ...