Files
nuzlocke-tracker/.beans/nuzlocke-tracker-ch77--integration-tests-for-games-routes-api.md
Julian Tabel 6f4ed3460b Add Unit & Integration Tests epic with subtasks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 10:34:45 +01:00

26 lines
910 B
Markdown

---
# nuzlocke-tracker-ch77
title: Integration tests for Games & Routes API
status: draft
type: task
created_at: 2026-02-10T09:33:13Z
updated_at: 2026-02-10T09:33:13Z
parent: nuzlocke-tracker-yzpb
---
Write integration tests for the games and routes API endpoints in `backend/src/app/api/games.py`.
## Checklist
- [ ] Test CRUD operations for games (create, list, get, update, delete)
- [ ] Test route management within a game (create, list, reorder, update, delete)
- [ ] Test route encounter management (add/remove Pokemon to routes)
- [ ] Test bulk import functionality
- [ ] Test region grouping/filtering
- [ ] Test error cases (404 for missing games, validation errors, duplicate handling)
## Notes
- Use the httpx AsyncClient fixture from the test infrastructure task
- Each test should be independent — use fixtures to set up required data
- Test both success and error response codes and bodies