forked from 0xWheatyz/SPARC
Add JWT flow tests: registration, login, protected routes, token refresh, admin endpoints #1575
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
Roadmap item: P1 - Test coverage for auth and admin
The existing API tests in
tests/test_api.pybypass authentication entirely. Auth and admin endpoints have no test coverage.What to do
tests/test_api.py(or a newtests/test_auth.py) that exercise:pytestfixtures for test DB setup/teardownAcceptance criteria
auth.pyreaches >= 80%Ref: ROADMAP.md P1 - Test coverage for auth and admin
[Manager Triage] Assigned to @AI-QA. Priority: P2 (testing/CI). Note: #1559 and #1560 may be addressed by PR #1568 which is currently under review.
Triage: Already Resolved
Comprehensive JWT flow tests exist in
tests/test_auth.py(302 lines) covering registration, login, protected routes, token refresh, and admin endpoints. Security tests intests/test_security.py(116 lines) cover JWT secret validation and CORS config.Closing as resolved.