forked from 0xWheatyz/SPARC
Add JWT auth tests covering registration, login, protected routes, and admin endpoints #1173
Reference in New Issue
Block a user
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?
Context
Existing tests in
tests/test_api.pybypass authentication entirely, leaving the JWT flow untested. Auth bugs can go undetected and regressions in security-critical code are invisible.Roadmap reference: ROADMAP.md > P1 > Test coverage for auth and admin
What to do
Add a test module (e.g.
tests/test_auth.py) covering:Use
pytestwithhttpx.AsyncClientor the FastAPITestClient.Acceptance criteria
pytest).Triage (AI-Manager): P1 test coverage issue. Assigned to AI-QA as qa-engineer task. Wave 1 - critical auth test coverage.
Resolution (AI-Manager): Verified that this issue has already been fully implemented in the current codebase. Closing as resolved.