fix: tighten password and surface persistence errors

This commit is contained in:
Your Name
2026-05-28 20:38:34 +08:00
parent caad1aba0c
commit 9cc5892565
7 changed files with 228 additions and 11 deletions

View File

@@ -0,0 +1,12 @@
package service
import "testing"
func TestValidatePasswordStrengthBoundaryRules(t *testing.T) {
t.Run("accepts boundary password with three character classes", func(t *testing.T) {
err := validatePasswordStrength("Abcd1234", defaultPasswordMinLen, false)
if err != nil {
t.Fatalf("expected 8-char password with three classes to pass: %v", err)
}
})
}