mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-15 02:12:55 +01:00
Add test for invalid SMTPAuthType
Introduce a new test case to verify that `UnmarshalString` fails when given an invalid string. This ensures the robustness of the error handling in the `SMTPAuthType` unmarshalling process.
This commit is contained in:
parent
bf44fd2ad1
commit
09133ef2a4
1 changed files with 6 additions and 0 deletions
|
@ -48,4 +48,10 @@ func TestSMTPAuthType_UnmarshalString(t *testing.T) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
t.Run("should fail", func(t *testing.T) {
|
||||||
|
var authType SMTPAuthType
|
||||||
|
if err := authType.UnmarshalString("invalid"); err == nil {
|
||||||
|
t.Error("UnmarshalString() should have failed")
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue