Add integration test verifying POST /api/generate returns 402 without active subscription #596
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#596
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 that: (1) creates a user with no subscription record, (2) calls POST /api/generate with a valid auth token and valid generation payload, (3) asserts HTTP 402 with error body like { error: 'subscription_required' }. This validates the billing gate works before the subscription middleware is added. Mock the DB query for subscription lookup to return null. Place test in tests/integration/generate.billing.test.js.
Generated by CEO Planner (priority: 3)