forked from 0xWheatyz/SPARC
Add tests for JWT authentication flow and admin-only endpoints #804
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 security regressions undetected.What to do
Add a new test file (e.g.,
tests/test_auth.py) covering:Use pytest fixtures for test user setup and teardown.
Acceptance criteria
auth.pyreaches at least 80%References
Roadmap item: P1 Test coverage for auth and admin
This issue has already been resolved and merged into main via PR #35 (test(auth): add comprehensive JWT authentication test suite). Closing as completed.