mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 05:40:50 +01:00
Add test for IsTemp method on nil SendError
This commit introduces a new test case to verify the behavior of the IsTemp method when called on a nil SendError instance. It ensures that the method returns false as expected, improving test coverage for edge cases.
This commit is contained in:
parent
508a2f2a6c
commit
fcbd202595
1 changed files with 7 additions and 0 deletions
|
@ -83,6 +83,13 @@ func TestSendError_IsTemp(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestSendError_IsTempNil(t *testing.T) {
|
||||
var se *SendError
|
||||
if se.IsTemp() {
|
||||
t.Error("expected false on nil-senderror")
|
||||
}
|
||||
}
|
||||
|
||||
// returnSendError is a helper method to retunr a SendError with a specific reason
|
||||
func returnSendError(r SendErrReason, t bool) error {
|
||||
return &SendError{Reason: r, isTemp: t}
|
||||
|
|
Loading…
Reference in a new issue