medusa-project / book-tracker

Medusa Book Tracker
0 stars 0 forks source link

Additional BooksController.index() tests #34

Closed gaurijo closed 11 months ago

gaurijo commented 11 months ago

This PR addresses issue 33:

In BooksController.index(), there are four formats in the respond_to block: HTML, CSV, JSON, and XML. We should have tests for each of these that check for an HTTP 200 response, check the Content-Type header, and ideally check that the response body looks like valid HTML/CSV/JSON/XML.

Each format (HTML, CSV, JSON, and XML) tests for the following: