diff --git a/senderror_test.go b/senderror_test.go index 8b7bfb3..bf823e9 100644 --- a/senderror_test.go +++ b/senderror_test.go @@ -108,6 +108,13 @@ func TestSendError_MessageID(t *testing.T) { } } +func TestSendError_MessageIDNil(t *testing.T) { + var se *SendError + if se.MessageID() != "" { + t.Error("expected empty string on nil-senderror") + } +} + func TestSendError_Msg(t *testing.T) { var se *SendError err := returnSendError(ErrAmbiguous, false) @@ -131,6 +138,13 @@ func TestSendError_Msg(t *testing.T) { } } +func TestSendError_MsgNil(t *testing.T) { + var se *SendError + if se.Msg() != nil { + t.Error("expected nil on nil-senderror") + } +} + // returnSendError is a helper method to retunr a SendError with a specific reason func returnSendError(r SendErrReason, t bool) error { message := NewMsg()