forked from 0xWheatyz/SPARC
Add JWT auth flow tests covering registration, login, protected routes, and admin endpoints #311
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. There are no tests verifying that protected routes reject unauthenticated requests, that tokens are correctly validated, or that admin-only endpoints enforce role checks.Work Required
tests/test_auth.py(or extendtest_api.py) covering:Acceptance Criteria
pytest tests/test_auth.py)auth.pyreaches at least 80%This issue has already been resolved in the fork's main branch. Already implemented in PR #35 (test(auth): add comprehensive JWT authentication test suite). See tests/test_auth.py.
Closing as completed.