fix
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user