style: fix test name typo, table-test reporting, validator wording
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -132,7 +132,7 @@ func TestAuditListCoreRenders(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAccountEditFromValidationRejectsMailformed(t *testing.T) {
|
func TestAccountEditFromValidationRejectsMalformed(t *testing.T) {
|
||||||
adminEnv(t)
|
adminEnv(t)
|
||||||
// Seed an account so the failure is from --from validation, not a missing account.
|
// Seed an account so the failure is from --from validation, not a missing account.
|
||||||
run(t, "account", "add", "--name", "valacc", "--imap-host", "imap.x.com", "--username", "u@x.com")
|
run(t, "account", "add", "--name", "valacc", "--imap-host", "imap.x.com", "--username", "u@x.com")
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ func TestEnvelopeFromStripsDisplayName(t *testing.T) {
|
|||||||
}
|
}
|
||||||
for in, want := range cases {
|
for in, want := range cases {
|
||||||
if got := envelopeFrom(in); got != want {
|
if got := envelopeFrom(in); got != want {
|
||||||
t.Fatalf("envelopeFrom(%q) = %q, want %q", in, got, want)
|
t.Errorf("envelopeFrom(%q) = %q, want %q", in, got, want)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ func ValidFromAddress(s string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if _, err := mail.ParseAddress(s); err != nil {
|
if _, err := mail.ParseAddress(s); err != nil {
|
||||||
return errors.New("from address must be a valid email address")
|
return errors.New("from address must be a valid email address or \"Name <email>\"")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user