mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-24 14:40:49 +01:00
Add test for MessageID on nil SendError
This test ensures that when MessageID is called on a nil SendError, it returns an empty string. This additional check helps verify the correct behavior of the MessageID method under nil conditions.
This commit is contained in:
parent
9ca7d24f6a
commit
a3fe2f88d5
1 changed files with 6 additions and 0 deletions
|
@ -174,6 +174,12 @@ func TestSendError_MessageID(t *testing.T) {
|
|||
t.Errorf("sendError expected empty message-id, got: %s", sendErr.MessageID())
|
||||
}
|
||||
})
|
||||
t.Run("TestSendError_MessageID on nil error should return empty", func(t *testing.T) {
|
||||
var sendErr *SendError
|
||||
if sendErr.MessageID() != "" {
|
||||
t.Error("expected empty message-id on nil-senderror")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestSendError_Msg(t *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue