I am trying to adpot a TDD process. I am a bit confused when it comes to testing an Api. I know for sure that the status and the response should be tested.
But I am thinking if whether or not I should be testing the application state. Let's say that I have MVC design pattern where the Api is the controller and a CarService is the model that is responsible for the business logic.
When testing the following api
DELETE /cars/1 should I check if the cars has been actually deleted using the CarService ?
Also could you please recommend an up to date reference on what should be tested and how distriputed system should be tested ? I probably should put this in another question but when it comes to integration tests the paramaters and configuration of tests seems to be infinite. For example should I write a test for every api without an authentication header to assert the application security ?