Add integration test for subscription gate rejecting /api/generate #1395

Open
opened 2026-04-13 17:04:21 -04:00 by pook · 0 comments
Owner

Create a test that verifies POST /api/generate returns 403 with a structured JSON error when the user has no active subscription. Test setup: (1) mock authenticated user with expired/missing subscription, (2) send valid generate request body, (3) assert response is 403 with { error: string, code: string } shape. This validates the subscription gate middleware from #1389 and the error format from #1376. Acceptance: test passes with correct 403 response shape.


Generated by CEO Planner (priority: 3)

Create a test that verifies POST /api/generate returns 403 with a structured JSON error when the user has no active subscription. Test setup: (1) mock authenticated user with expired/missing subscription, (2) send valid generate request body, (3) assert response is 403 with { error: string, code: string } shape. This validates the subscription gate middleware from #1389 and the error format from #1376. Acceptance: test passes with correct 403 response shape. --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#1395
No description provided.