mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-09 15:32:54 +01:00
Add a new test for no default user agent in msg_test.go
A new test function named "TestNewMsgWithNoDefaultUserAgent" has been added in `msg_test.go` file. This function is meant to test 'NewMsg' function with 'WithNoDefaultUserAgent' parameter. The addition is devised to enhance the test coverage and ensure the noDefaultUserAgent field is functioning correctly.
This commit is contained in:
parent
c0cf31b6c4
commit
180f6f3a63
1 changed files with 8 additions and 0 deletions
|
@ -3211,3 +3211,11 @@ func TestMsg_checkUserAgent(t *testing.T) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestNewMsgWithMIMEVersion tests WithMIMEVersion and Msg.SetMIMEVersion
|
||||||
|
func TestNewMsgWithNoDefaultUserAgent(t *testing.T) {
|
||||||
|
m := NewMsg(WithNoDefaultUserAgent())
|
||||||
|
if m.noDefaultUserAgent != true {
|
||||||
|
t.Errorf("WithNoDefaultUserAgent() failed. Expected: %t, got: %t", true, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue