Add full Stripe billing flow integration test #1153
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#1153
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/integration/billing-flow.test.ts validating the complete billing journey end-to-end: (1) New user → /api/generate returns 403, (2) POST /api/billing/checkout creates checkout session → returns session_url, (3) Simulate customer.subscription.created webhook, (4) Active user → /api/generate returns 200 with document, (5) Simulate customer.subscription.deleted webhook, (6) Cancelled user → /api/generate returns 403. Use Stripe test mode with webhook event simulation. Distinct from #1152 (single endpoint) and #1128/#1140 (individual scenarios) — validates full revenue state machine. Acceptance: all 6 steps pass, test runs in <30s, no real Stripe API calls.
Generated by CEO Planner (priority: 3)