gohorsejobs/backend/internal/infrastructure
Tiago Yamamoto 052f5169c5 test(auth): add comprehensive auth tests with 98.6% coverage
Backend Tests Added:
- auth_middleware_test.go: 25+ tests for HeaderAuthGuard, OptionalHeaderAuthGuard, RequireRoles, TenantGuard, ExtractRoles, hasRole (100% coverage)
- cors_middleware_test.go: 7 tests for CORS origin validation (100% coverage)
- jwt_service_test.go: expanded with expiration parsing, wrong signing method tests (94.4% coverage)

Features:
- Maximum console.log/fmt.Printf output for debugging
- Tests for JWT from header and cookie fallback
- Tests for role-based access (case-insensitive)
- Tests for tenant enforcement
- Tests for token expiration parsing (7d, 2h, invalid formats)

Total backend auth coverage: 98.6%
2025-12-24 16:20:56 -03:00
..
auth test(auth): add comprehensive auth tests with 98.6% coverage 2025-12-24 16:20:56 -03:00
email feat: implement high priority features 2025-12-24 11:40:53 -03:00
persistence/postgres refactor(roles): rename companyAdmin->admin and jobSeeker->candidate 2025-12-24 13:30:50 -03:00
storage feat(backend): implement S3 object storage with pre-signed URLs 2025-12-11 14:41:25 -03:00