What to build
Parameterize the collection endpoint test suites so all three media types get identical coverage, and consolidate the copy-pasted test infrastructure.
Today the movies/music/games endpoint test files triplicate 16 identically-named scenarios (auth, ownership, CRUD round-trips, tag handling, validation), while 11 further behaviors — currency normalization, boundary ratings, tag replacement semantics, cover URL handling, owner-scoped tags, and more — are verified for movies only even though the production code paths are byte-identical across the three types. The suite also re-declares response DTOs and Sample() factories per file, hand-rolls the same HTTP stub handler in four places, and boots a full web host per test (186 times), each boot replaying all migrations.
Convert the shared scenarios into one parameterized (or shared-base) suite that runs per media type, extract a single test-support module (DTOs, sample factories, stub-handler family, class-level host fixture), and align unit-level tests with the endpoint tests on the migration-based schema path so a model/migration divergence is visible to the whole suite.
This is the safety net for the collection-endpoint consolidation — it must land first.
Acceptance criteria
Blocked by
None — can start immediately.
What to build
Parameterize the collection endpoint test suites so all three media types get identical coverage, and consolidate the copy-pasted test infrastructure.
Today the movies/music/games endpoint test files triplicate 16 identically-named scenarios (auth, ownership, CRUD round-trips, tag handling, validation), while 11 further behaviors — currency normalization, boundary ratings, tag replacement semantics, cover URL handling, owner-scoped tags, and more — are verified for movies only even though the production code paths are byte-identical across the three types. The suite also re-declares response DTOs and
Sample()factories per file, hand-rolls the same HTTP stub handler in four places, and boots a full web host per test (186 times), each boot replaying all migrations.Convert the shared scenarios into one parameterized (or shared-base) suite that runs per media type, extract a single test-support module (DTOs, sample factories, stub-handler family, class-level host fixture), and align unit-level tests with the endpoint tests on the migration-based schema path so a model/migration divergence is visible to the whole suite.
This is the safety net for the collection-endpoint consolidation — it must land first.
Acceptance criteria
Blocked by
None — can start immediately.