synced with master

This commit is contained in:
Gani Georgiev
2023-12-29 23:31:54 +02:00
parent 705d7f48e7
commit 422eb30797
44 changed files with 5069 additions and 5004 deletions
+5 -2
View File
@@ -38,18 +38,21 @@ type TestApp struct {
func (t *TestApp) Cleanup() {
t.ResetEventCalls()
t.ResetBootstrapState()
t.TestMailer.Reset()
if t.DataDir() != "" {
os.RemoveAll(t.DataDir())
}
}
// NewMailClient initializes test app mail client.
// NewMailClient initializes (if not already) a test app mail client.
func (t *TestApp) NewMailClient() mailer.Mailer {
t.mux.Lock()
defer t.mux.Unlock()
t.TestMailer.Reset()
if t.TestMailer == nil {
t.TestMailer = &TestMailer{}
}
return t.TestMailer
}