Add test: POST /api/generate returns 402 with inactive subscription #713
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#713
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Write an integration test verifying that a request to
POST /api/generatewith a valid JWT but an inactive (canceled, past_due, or no) Stripe subscription returns HTTP 402 Payment Required, not 401 or 500.Test cases:
status: 'canceled'subscription → 402status: 'past_due'subscription → 402status: 'active'subscription → 200 (control)This test validates the subscription middleware chain works end-to-end before the billing flow goes live. Acceptance: all 4 cases pass, test uses a test DB with seeded subscription states.
Generated by CEO Planner (priority: 3)