mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 13:50:49 +01:00
Add additional SSL and TLS tests in client_test.go
Enhanced the unit tests in client_test.go by adding more test cases for SSL Port and TLS Port Policy. These additions contribute to more effective coverage of edge cases and increase the robustness of the test suite.
This commit is contained in:
parent
80893bd27a
commit
4a90c2de62
1 changed files with 3 additions and 0 deletions
|
@ -89,9 +89,12 @@ func TestNewClientWithOptions(t *testing.T) {
|
|||
{"WithTimeout()", WithTimeout(time.Second * 5), false},
|
||||
{"WithTimeout()", WithTimeout(-10), true},
|
||||
{"WithSSL()", WithSSL(), false},
|
||||
{"WithSSLPort(false)", WithSSLPort(false), false},
|
||||
{"WithSSLPort(true)", WithSSLPort(true), false},
|
||||
{"WithHELO()", WithHELO(host), false},
|
||||
{"WithHELO(); helo is empty", WithHELO(""), true},
|
||||
{"WithTLSPolicy()", WithTLSPolicy(TLSOpportunistic), false},
|
||||
{"WithTLSPortPolicy()", WithTLSPortPolicy(TLSOpportunistic), false},
|
||||
{"WithTLSConfig()", WithTLSConfig(&tls.Config{}), false},
|
||||
{"WithTLSConfig(); config is nil", WithTLSConfig(nil), true},
|
||||
{"WithSMTPAuth()", WithSMTPAuth(SMTPAuthLogin), false},
|
||||
|
|
Loading…
Reference in a new issue