Your Name
108ee462d3
test: add AuthService and CaptchaService unit tests
AuthService Tests (22 functions):
Password Strength:
- GetPasswordStrength_Empty: empty password
- GetPasswordStrength_OnlyLowercase: lowercase only
- GetPasswordStrength_OnlyUppercase: uppercase only
- GetPasswordStrength_OnlyDigits: digits only
- GetPasswordStrength_OnlySpecial: special chars only
- GetPasswordStrength_TwoTypes: two character types
- GetPasswordStrength_ThreeTypes: three character types
- GetPasswordStrength_FourTypes: all character types
- GetPasswordStrength_Unicode: unicode handling
LoginRequest.GetAccount:
- GetAccount_Nil: nil request
- GetAccount_Empty: empty request
- GetAccount_Account: account field
- GetAccount_Username: username field
- GetAccount_Email: email field
- GetAccount_Phone: phone field
- GetAccount_Priority: field priority
- GetAccount_Trimmed: whitespace trimming
- GetAccount_EmptyAfterTrim: whitespace only
CaptchaService Tests (15 functions):
- Generate_Success: captcha generation
- Verify_CorrectAnswer: verification logic
- Verify_EmptyID: empty ID validation
- Verify_EmptyAnswer: empty answer validation
- Verify_NonExistent: non-existent captcha
- VerifyOneTimeUse: one-time use
- ValidateCaptcha_Success: validation success
- ValidateCaptcha_EmptyID: empty ID error
- ValidateCaptcha_EmptyAnswer: empty answer error
- MultipleGeneration: unique IDs
- Verify_CaseInsensitive: case handling
- Generate: basic generation
- Verify: basic verification
- ValidateCaptcha: basic validation
- VerifyWithoutDelete: test helper
Coverage:
- AuthService password validation: ~100%
- CaptchaService: ~85%+
- All service tests pass
2026-05-30 14:54:36 +08:00
..
2026-05-30 14:37:15 +08:00
2026-05-28 15:19:13 +08:00
2026-05-29 17:38:48 +08:00
2026-04-18 20:48:11 +08:00
2026-05-28 15:19:34 +08:00
2026-04-18 22:57:44 +08:00
2026-05-29 21:04:33 +08:00
2026-04-18 20:48:11 +08:00
2026-04-17 20:43:50 +08:00
feat: backend core - auth, user, role, permission, device, webhook, monitoring, cache, repository, service, middleware, API handlers
2026-04-02 11:19:50 +08:00
2026-05-29 17:23:44 +08:00
2026-05-29 14:57:49 +08:00
2026-04-18 20:48:11 +08:00
2026-05-29 21:20:30 +08:00
2026-05-29 16:59:05 +08:00
2026-04-17 20:43:50 +08:00
2026-05-29 17:28:57 +08:00
2026-05-29 16:04:40 +08:00
2026-05-30 14:54:36 +08:00
2026-04-17 20:43:50 +08:00
2026-04-17 20:43:50 +08:00
2026-05-29 20:13:56 +08:00