forked from 0xWheatyz/SPARC
Add test coverage for JWT auth flow: registration, login, protected routes, and admin endpoints #740
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 reference: P1 - Test coverage for auth and admin
Existing API tests in
tests/test_api.pybypass authentication entirely. There is no test coverage for the JWT flow, leaving security-critical paths untested.What to do
Add tests to
tests/test_api.py(or a newtests/test_auth.py) covering:Acceptance criteria
pytestexits with code 0 when all tests passResolved.
tests/test_auth.py(302 lines) covers registration, login, protected routes, token refresh, and admin-only endpoints with real JWT flow.