Skip to content

test(api): route-handler tests for ticket transitions#51

Merged
ankitsejwal merged 1 commit into
mainfrom
test/tickets-routes
Jul 2, 2026
Merged

test(api): route-handler tests for ticket transitions#51
ankitsejwal merged 1 commit into
mainfrom
test/tickets-routes

Conversation

@ankitsejwal

Copy link
Copy Markdown
Member

Hardens the maintenance-tickets vertical with handler-level tests for applyTicketTransition (previously only the pure state machine was unit-tested).

Mirrors the existing visitor route-test pattern (fake Drizzle client + fake Context): 404 on a missing ticket, 409 on illegal transitions, and the start/resolve/close/reopen/cancel success paths — including that the extra set values (e.g. resolutionNote) are persisted.

6 new tests (104 API tests total); full gate green.

Covers applyTicketTransition directly (fake db/ctx, mirroring the visitor
route tests): 404 on missing, 409 on illegal transitions, and the
start/resolve/close/reopen/cancel success paths incl. extra set values.
@ankitsejwal ankitsejwal merged commit 1835c90 into main Jul 2, 2026
1 check passed
@ankitsejwal ankitsejwal deleted the test/tickets-routes branch July 2, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant