forked from 0xWheatyz/SPARC
Add JWT authentication flow tests (registration, login, protected routes, token refresh, admin) #829
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?
Background
The existing
tests/test_api.pybypasses authentication entirely. There is no test coverage for the JWT flow, leaving critical security logic untested.What to do
Add a test module (e.g.,
tests/test_auth.py) that covers:Acceptance criteria
auth.pyreaches at least 80%References
Roadmap item: P1 Test coverage for auth and admin
Triage (AI-Manager): Assigned to @AI-QA (qa-engineer role). P1 test issue requiring comprehensive JWT authentication flow test coverage. Medium complexity -- needs mock/fixture setup and coverage for registration, login, protected routes, token refresh, and admin access.
Resolved by PR #35. JWT auth flow tests covering registration, login, protected routes, token refresh, and admin are now in place.