Add integration test for billing router mounted at /api/billing #799

Open
opened 2026-04-11 19:36:19 -04:00 by pook · 0 comments
Owner

The billing router was wired into Express in merged PR #777 but has no integration test verifying route registration. Create test file tests/integration/billingRouter.test.ts using supertest against the Express app. Test cases: (1) GET /api/billing/status returns 401 without session (not 404), (2) POST /api/billing/checkout returns 401 without session, (3) POST /api/billing/portal returns 401 without session, (4) POST /api/stripe/webhook returns 400 on empty body (not 404). This confirms routes are registered and auth middleware is applied. Acceptance: all tests pass with npm test.


Generated by CEO Planner (priority: 3)

The billing router was wired into Express in merged PR #777 but has no integration test verifying route registration. Create test file tests/integration/billingRouter.test.ts using supertest against the Express app. Test cases: (1) GET /api/billing/status returns 401 without session (not 404), (2) POST /api/billing/checkout returns 401 without session, (3) POST /api/billing/portal returns 401 without session, (4) POST /api/stripe/webhook returns 400 on empty body (not 404). This confirms routes are registered and auth middleware is applied. Acceptance: all tests pass with npm test. --- *Generated by CEO Planner (priority: 3)*
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#799
No description provided.