Documentation
¶
Overview ¶
Package mailtest tests the mail an app sends: a quiet log-driver Mailer to provide, and helpers reading what it kept.
m := mailtest.New()
app := web.New(web.Provide(m))
… sign up …
msg := mailtest.Last(t, m)
if msg.Recipients[0] != "ada@example.com" || !strings.Contains(msg.Text, "Welcome") { … }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New is a log-driver Mailer that logs nothing, its sender test@example.com unless cfg says otherwise.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.