forked from 0xWheatyz/SPARC
Test: add JWT authentication flow tests (registration, login, protected routes, token refresh, admin endpoints) #881
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
The existing API tests in
tests/test_api.pybypass authentication entirely. Critical auth and admin flows have no test coverage.Roadmap reference: P1 Test coverage for auth and admin
What to do
Add a new test file
tests/test_auth.py(or extend the existing file) covering:Acceptance criteria
pytestruns all new tests successfully in CI.This issue has been resolved. The changes are already merged into main.
Comprehensive JWT auth tests added in tests/test_auth.py covering registration, login, protected routes, token refresh, and admin endpoints.
Closing as completed.