Add E2E test: cancelled subscription blocked from /api/generate #1140

Open
opened 2026-04-12 16:23:12 -04:00 by pook · 0 comments
Owner

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)

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)*
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#1140
No description provided.