Add unit test for POST /api/generate with subscription status variations #775
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#775
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?
Create tests/unit/generate.test.ts testing /api/generate paywall behavior. Mock the subscription helper (#757) and LLM call. Test cases: (1) active subscription → 200 with generated document, (2) no subscription → 403 with upgrade message, (3) expired/canceled subscription → 403 with re-subscribe message. Acceptance: 3 tests passing, validates the requireSubscription middleware (#751) gates the revenue endpoint correctly.
Generated by CEO Planner (priority: 3)