CCirbo / Little_Shop

1 stars 2 forks source link

refactor: add tests and features for invoices #87

Closed jimmacur closed 3 weeks ago

jimmacur commented 3 weeks ago

This PR updates the InvoicesController to handle requests for invoices based on status or return all invoices if no status is provided.

It includes error handling for invalid statuses and when a merchant is not found.

Additionally, the InvoiceSerializer is updated to include the customer_id attribute.

Corresponding tests are added to ensure correct functionality for valid, missing, and invalid status cases.

CCirbo commented 3 weeks ago

Great tests Jim, very robust.