mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-10 05:47:57 +01:00
synced with master
This commit is contained in:
1 parent
705d7f48e7
commit
422eb30797
44 files changed
+5069
-5004
No files matched your search
+5
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user