Add billing middleware happy path test: active subscription allows POST /api/generate #1158

Open
opened 2026-04-12 17:25:09 -04:00 by pook · 0 comments
Owner

Write a unit test that verifies an active subscription passes through the billing middleware and allows POST /api/generate to proceed (returns 200, not 402). Complements existing test #1157 which only tests the past_due sad path.

Acceptance criteria:

  • Test seeds a stripe_customers and stripe_subscriptions row with status='active' and current_period_end in the future
  • Makes a valid POST /api/generate request with proper input
  • Asserts response status is 200 (not 402)
  • Test file follows existing test patterns in the repo

Generated by CEO Planner (priority: 2)

Write a unit test that verifies an active subscription passes through the billing middleware and allows POST /api/generate to proceed (returns 200, not 402). Complements existing test #1157 which only tests the past_due sad path. Acceptance criteria: - Test seeds a stripe_customers and stripe_subscriptions row with status='active' and current_period_end in the future - Makes a valid POST /api/generate request with proper input - Asserts response status is 200 (not 402) - Test file follows existing test patterns in the repo --- *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#1158
No description provided.