Add E2E test: cancelled subscription blocked from /api/generate #1140
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#1140
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 end-to-end test verifying the billing cancellation flow: (1) create a user with active subscription, (2) simulate customer.subscription.deleted webhook (note: PR #776 adds this handler), (3) verify subscription status is 'canceled' in DB, (4) call POST /api/generate with that user's auth, (5) assert response is 403 Payment Required.
Use existing test framework. Mock Stripe webhook signature verification. This validates the entire billing gate for cancellations end-to-end.
Acceptance: Test passes. Covers webhook → DB update → access blocked. No real Stripe API calls.
Generated by CEO Planner (priority: 2)