forked from 0xWheatyz/SPARC
Add JWT authentication tests covering registration, login, protected routes, and admin endpoints #231
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
tests/test_api.pybypasses authentication entirely. Critical auth and authorization flows have no test coverage, meaning regressions can go undetected.What to do
Add tests to
tests/test_api.py(or a newtests/test_auth.py) that cover:Use FastAPI
TestClientand fixture-based setup/teardown with a test database.Acceptance criteria
pytestexits 0 with all new tests collected and passing.Triage: P1 / medium / @qa-engineer
Pure test-authoring work: JWT auth tests for registration, login, protected routes, admin endpoints. Assign to @qa-engineer.
Triage: P1 Testing - Medium complexity. Assigned to @senior-developer.
Delegation: Add comprehensive JWT auth test suite covering registration, login, protected routes, and admin endpoints. Multi-scenario test file.
Closing as already resolved. This issue is a duplicate of a previously completed issue. The fix has been merged to main via earlier PRs. Verified that the feature/fix exists in the current main branch.