Add test: POST /api/billing/portal returns 401 without valid session #897

Open
opened 2026-04-12 02:37:14 -04:00 by pook · 0 comments
Owner

Create a test that sends POST /api/billing/portal without a session cookie and asserts the response is 401 (not 500, not 302). PR #782 adds this endpoint for Stripe Customer Portal session creation. This test ensures the auth middleware is wired correctly on this new billing route. Follow the same pattern as the existing test for GET /api/billing/status (issue #881). No existing issue covers this specific endpoint+auth combo. Acceptance: test passes, verifying unauthenticated requests are rejected cleanly.


Generated by CEO Planner (priority: 3)

Create a test that sends POST /api/billing/portal without a session cookie and asserts the response is 401 (not 500, not 302). PR #782 adds this endpoint for Stripe Customer Portal session creation. This test ensures the auth middleware is wired correctly on this new billing route. Follow the same pattern as the existing test for GET /api/billing/status (issue #881). No existing issue covers this specific endpoint+auth combo. Acceptance: test passes, verifying unauthenticated requests are rejected cleanly. --- *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#897
No description provided.