mirror of
https://github.com/volatiletech/authboss.git
synced 2024-11-28 08:58:38 +02:00
982025bbc3
- Rejig tests to remember to test the smtp mailer
25 lines
383 B
Go
25 lines
383 B
Go
package defaults
|
|
|
|
import "testing"
|
|
|
|
func TestSMTPMailer(t *testing.T) {
|
|
t.Skip("must implement test against real smtp servers here")
|
|
}
|
|
|
|
func TestSMTPMailerPanic(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
_ = NewSMTPMailer("server", nil)
|
|
|
|
recovered := false
|
|
defer func() {
|
|
recovered = recover() != nil
|
|
}()
|
|
|
|
NewSMTPMailer("", nil)
|
|
|
|
if !recovered {
|
|
t.Error("Should have panicked.")
|
|
}
|
|
}
|