summaryrefslogtreecommitdiff
path: root/test/emails/mailer_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-08-28 12:17:19 +0000
committerlain <lain@soykaf.club>2020-08-28 12:17:19 +0000
commit73dd5bdb7dcdf804bdbabcf632671d4de5042ebc (patch)
treeefcb0b8e68f86d067de98a23f40a24c7dab79d2f /test/emails/mailer_test.exs
parentf891e2b2f1d1daa122b9856e4b660be394d31e34 (diff)
parentb141e35d641e733dffe7bd6a45a5bbcafe586c56 (diff)
Merge branch 'release/2.1.0' into 'stable'v2.1.0
Release/2.1.0 See merge request pleroma/pleroma!2927
Diffstat (limited to 'test/emails/mailer_test.exs')
-rw-r--r--test/emails/mailer_test.exs8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/emails/mailer_test.exs b/test/emails/mailer_test.exs
index f30aa6a72..9e232d2a0 100644
--- a/test/emails/mailer_test.exs
+++ b/test/emails/mailer_test.exs
@@ -14,12 +14,12 @@ defmodule Pleroma.Emails.MailerTest do
subject: "Pleroma test email",
to: [{"Test User", "user1@example.com"}]
}
-
- clear_config([Pleroma.Emails.Mailer, :enabled])
+ setup do: clear_config([Pleroma.Emails.Mailer, :enabled], true)
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)
+ :timer.sleep(100)
refute_email_sent(
from: {"Pleroma", "noreply@example.com"},
@@ -31,6 +31,7 @@ defmodule Pleroma.Emails.MailerTest do
test "send email" do
Mailer.deliver(@email)
+ :timer.sleep(100)
assert_email_sent(
from: {"Pleroma", "noreply@example.com"},
@@ -42,6 +43,7 @@ defmodule Pleroma.Emails.MailerTest do
test "perform" do
Mailer.perform(:deliver_async, @email, [])
+ :timer.sleep(100)
assert_email_sent(
from: {"Pleroma", "noreply@example.com"},