Refactor TestSendError_ErrorMulti formatting

Reformatted the instantiation of the SendError struct to improve readability. This helps maintain consistency and clarity in the code base for better collaboration and future maintenance.
This commit is contained in:
Winni Neessen 2024-09-20 21:15:13 +02:00
parent f3633e1913
commit 4053457020
Signed by: wneessen
GPG key ID: 385AC9889632126E

View file

@ -156,8 +156,10 @@ func TestSendError_IsFail(t *testing.T) {
func TestSendError_ErrorMulti(t *testing.T) { func TestSendError_ErrorMulti(t *testing.T) {
expected := `ambiguous reason, check Msg.SendError for message specific reasons, ` + expected := `ambiguous reason, check Msg.SendError for message specific reasons, ` +
`affected recipient(s): <email1@domain.tld>, <email2@domain.tld>` `affected recipient(s): <email1@domain.tld>, <email2@domain.tld>`
err := &SendError{Reason: ErrAmbiguous, isTemp: false, affectedMsg: nil, err := &SendError{
rcpt: []string{"<email1@domain.tld>", "<email2@domain.tld>"}} Reason: ErrAmbiguous, isTemp: false, affectedMsg: nil,
rcpt: []string{"<email1@domain.tld>", "<email2@domain.tld>"},
}
if err.Error() != expected { if err.Error() != expected {
t.Errorf("error mismatch, expected: %s, got: %s", expected, err.Error()) t.Errorf("error mismatch, expected: %s, got: %s", expected, err.Error())
} }