mirror of
https://github.com/wneessen/go-mail.git
synced 2024-12-18 08:50:39 +01:00
Add validation for custom SMTP auth type in client tests
Previously, only the presence of the SMTP auth method was checked, but not its type. This additional validation ensures that the SMTP auth type is correctly set to custom, thereby improving test accuracy.
This commit is contained in:
parent
972a3c51c7
commit
8942b08424
1 changed files with 4 additions and 0 deletions
|
@ -602,6 +602,10 @@ func TestSetSMTPAuthCustom(t *testing.T) {
|
||||||
if c.smtpAuth == nil {
|
if c.smtpAuth == nil {
|
||||||
t.Errorf("failed to set custom SMTP auth method. SMTP Auth method is empty")
|
t.Errorf("failed to set custom SMTP auth method. SMTP Auth method is empty")
|
||||||
}
|
}
|
||||||
|
if c.smtpAuthType != SMTPAuthCustom {
|
||||||
|
t.Errorf("failed to set custom SMTP auth method. SMTP Auth type is not custom: %s",
|
||||||
|
c.smtpAuthType)
|
||||||
|
}
|
||||||
p, _, err := c.smtpAuth.Start(&si)
|
p, _, err := c.smtpAuth.Start(&si)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("SMTP Auth Start() method returned error: %s", err)
|
t.Errorf("SMTP Auth Start() method returned error: %s", err)
|
||||||
|
|
Loading…
Reference in a new issue