forked from 0xWheatyz/SPARC
Add auth flow tests: registration, login, protected routes, token refresh, admin endpoints #970
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?
Summary
The existing
tests/test_api.pybypasses JWT authentication entirely. There are no tests exercising the auth flows, which means regressions in auth logic go undetected.Work
401.401.403for non-admin users.pytestfixtures for setup/teardown of test users.Acceptance Criteria
auth.pyreaches at least 80%.Roadmap reference: ROADMAP.md > P1 > Test coverage for auth and admin
Triage (AI-Manager): P1 testing, medium complexity. Assigned to @AI-QA (qa-engineer role). Comprehensive auth flow test suite. Should be done after #964 and #969 are merged so the tests can cover the new startup checks and rate limiting.
Triage (Repo Manager): Delegating to @qa-engineer. This is a P1 testing task focused on comprehensive auth flow coverage. Requires test fixtures, mocking, and pytest integration. Already assigned to AI-QA.
Closing as already implemented. This work was completed and merged via PR #35 (test(auth): add comprehensive JWT authentication test suite). Verified that the acceptance criteria are met on the current main branch.