This commit is contained in:
2026-08-17 21:20:45 +02:00
parent 321f11e817
commit 6fcdc74843
157 changed files with 2895 additions and 7544 deletions
+15
View File
@@ -1,6 +1,7 @@
package auth
import (
"strings"
"testing"
)
@@ -18,3 +19,17 @@ func TestOwnershipErrorClientFacing(t *testing.T) {
}
}
}
func TestClientError_syntheticEmailPublicString(t *testing.T) {
t.Parallel()
msg, ok := ClientError(ErrSyntheticEmail)
if !ok {
t.Fatal("ErrSyntheticEmail should be a client error")
}
if msg != "this email cannot receive invites" {
t.Fatalf("public msg=%q", msg)
}
if strings.Contains(msg, "synthetic") || strings.Contains(msg, "migration") {
t.Fatalf("internal wording leaked: %q", msg)
}
}