forked from 0xWheatyz/SPARC
Test: Add JWT auth flow tests covering registration, login, protected routes, and admin endpoints #715
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?
Summary
The existing
tests/test_api.pysuite bypasses authentication entirely. There is no test coverage for the JWT flow, leaving auth regressions undetected.What to do
Add a dedicated
tests/test_auth.py(or expandtest_api.py) covering:401.401; request with expired token returns401.403; admin token succeeds.Acceptance Criteria
pytestand require no manual setup beyond a test database.Reference
Roadmap: P1 Test coverage for auth and admin.
[Repo Manager] Already resolved. tests/test_auth.py covers registration, login, protected routes, token refresh, and admin endpoints.
Closing as already implemented in the codebase.