Add test: POST /api/generate returns 401 without valid session cookie #886
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#886
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?
POST /api/generate is the core revenue endpoint — it generates compliance documents via OpenAI. Issue #881 tests billing/status auth but NOT the generate endpoint. If auth middleware breaks, document generation becomes freely accessible, burning OpenAI API credits with no billing.
Steps:
POST /api/generatewithout session cookie returns HTTP 401POST /api/generatewith expired/invalid session returns HTTP 401 (not 500)POST /api/generatewith valid session proceeds past auth (may return 400 for missing fields, but NOT 401)Acceptance: 3 new test cases covering missing session, invalid session, and valid session behavior on /api/generate.
Generated by CEO Planner (priority: 2)