-
Notifications
You must be signed in to change notification settings - Fork 5
[Feature]: Add Integration Tests for Authentication Endpoints #31
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
The application currently has only a basic context load test. We need comprehensive integration tests for all authentication endpoints to ensure reliability and prevent regressions.
Proposed solution
1. Registration Tests (/auth/register)
- Valid registration with all required fields
- Duplicate username handling
- Duplicate email handling
- Invalid email format
- Password validation (minimum requirements)
- Missing required fields
2. Login Tests (/auth/login)
- Valid login with email
- Valid login with username
- Invalid credentials
- Non-existent user
- Missing fields
3. Token Refresh Tests (/auth/refresh/{token})
- Valid refresh token
- Expired refresh token
- Invalid/malformed token
- Non-existent token
4. Protected Endpoint Tests (/auth/me, /auth/logout)
- Valid JWT token
- Missing Authorization header
- Invalid JWT token
- Expired JWT token
Acceptance criteria
- All public endpoints have happy path tests
- All public endpoints have error case tests
- All protected endpoints tested with valid JWT
- All protected endpoints tested without JWT
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request