projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remote Timeline: add Streaming support
[akkoma]
/
test
/
emails
/
mailer_test.exs
diff --git
a/test/emails/mailer_test.exs
b/test/emails/mailer_test.exs
index e6e34cba8a3eba3f9efc98cb6ae2f9091e8b3cb5..9e232d2a0b8fab77b33e40633d377c0e3d11eeb8 100644
(file)
--- a/
test/emails/mailer_test.exs
+++ b/
test/emails/mailer_test.exs
@@
-14,11
+14,12
@@
defmodule Pleroma.Emails.MailerTest do
subject: "Pleroma test email",
to: [{"Test User", "user1@example.com"}]
}
subject: "Pleroma test email",
to: [{"Test User", "user1@example.com"}]
}
- setup do: clear_config([Pleroma.Emails.Mailer, :enabled])
+ setup do: clear_config([Pleroma.Emails.Mailer, :enabled]
, true
)
test "not send email when mailer is disabled" do
test "not send email when mailer is disabled" do
-
Pleroma.Config.put
([Pleroma.Emails.Mailer, :enabled], false)
+
clear_config
([Pleroma.Emails.Mailer, :enabled], false)
Mailer.deliver(@email)
Mailer.deliver(@email)
+ :timer.sleep(100)
refute_email_sent(
from: {"Pleroma", "noreply@example.com"},
refute_email_sent(
from: {"Pleroma", "noreply@example.com"},
@@
-30,6
+31,7
@@
defmodule Pleroma.Emails.MailerTest do
test "send email" do
Mailer.deliver(@email)
test "send email" do
Mailer.deliver(@email)
+ :timer.sleep(100)
assert_email_sent(
from: {"Pleroma", "noreply@example.com"},
assert_email_sent(
from: {"Pleroma", "noreply@example.com"},
@@
-41,6
+43,7
@@
defmodule Pleroma.Emails.MailerTest do
test "perform" do
Mailer.perform(:deliver_async, @email, [])
test "perform" do
Mailer.perform(:deliver_async, @email, [])
+ :timer.sleep(100)
assert_email_sent(
from: {"Pleroma", "noreply@example.com"},
assert_email_sent(
from: {"Pleroma", "noreply@example.com"},