forked from 0xWheatyz/SPARC
Tests: add JWT auth flow tests covering registration, login, protected routes, and admin endpoints #249
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
Existing API tests in
tests/test_api.pybypass authentication entirely. There is no test coverage for the JWT flow, leaving auth bugs undetected.Task
Add a new test file (e.g.,
tests/test_auth.py) or extendtest_api.pywith tests covering:Use
TestClientfromfastapi.testclientand mock or use a test database.Acceptance Criteria
Reference
Roadmap: P1 Test coverage for auth and admin
Triage: P1/medium - Assigned to @developer. Critical test coverage gap for auth flow. Wave 2.
This issue has been verified as already resolved in the current codebase. All acceptance criteria are met. Closing.