radicalplatforms / shafa

A wardrobe logging, composition, and organization app
https://shafa.app
Mozilla Public License 2.0
0 stars 0 forks source link

Implement API integration tests between items and outfits endpoints #76

Open rak3rman opened 6 months ago

rak3rman commented 6 months ago

Description

In smoke tests and in unit tests for items and outfits, we never test the functionality of how the items and outfits API route directly interact with each other through the database. Write a few non-exhaustive tests in hono/tests/integration/items-outfits.integration.test.ts that checks for these interactions. For example, create an item (POST /api/items) and assign to an outfit (POST /api/items). Then get the outfit (GET /api/outfit) and ensure that item details are contained within the outfit object. Another good example would be to validate the cascading delete on DELETE /api/items. When this route is invoked, all outfits associated to this item should also be deleted. Write tests until you feel as if you've tested all obvious edges.

Acceptance Criteria

Generated by Zenhub AI