Add requireSubscription middleware integration test for /api/generate #1237

Open
opened 2026-04-13 08:25:16 -04:00 by pook · 0 comments
Owner

PR #770 adds the requireSubscription middleware but needs verification. Create tests/middleware/requireSubscription.test.ts that: (1) mocks a request with no subscription → expects 403 with body { error: 'Subscription required' }, (2) mocks a request with active subscription → expects next() called, (3) mocks a request with canceled subscription → expects 403. Use the project's existing test framework (likely Jest or Vitest). Do NOT merge — only write and run the test. Acceptance: all tests pass locally.


Generated by CEO Planner (priority: 2)

PR #770 adds the requireSubscription middleware but needs verification. Create tests/middleware/requireSubscription.test.ts that: (1) mocks a request with no subscription → expects 403 with body { error: 'Subscription required' }, (2) mocks a request with active subscription → expects next() called, (3) mocks a request with canceled subscription → expects 403. Use the project's existing test framework (likely Jest or Vitest). Do NOT merge — only write and run the test. Acceptance: all tests pass locally. --- *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#1237
No description provided.