MailerTest: Give it some time.

This commit is contained in:
lain 2020-08-05 17:26:03 +02:00
parent 5221879c35
commit 2173945f90
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ defmodule Pleroma.Emails.MailerTest do
test "not send email when mailer is disabled" do
Pleroma.Config.put([Pleroma.Emails.Mailer, :enabled], false)
Mailer.deliver(@email)
:timer.sleep(100)
refute_email_sent(
from: {"Pleroma", "noreply@example.com"},
@ -30,6 +31,7 @@ test "not send email when mailer is disabled" do
test "send email" do
Mailer.deliver(@email)
:timer.sleep(100)
assert_email_sent(
from: {"Pleroma", "noreply@example.com"},
@ -41,6 +43,7 @@ test "send email" do
test "perform" do
Mailer.perform(:deliver_async, @email, [])
:timer.sleep(100)
assert_email_sent(
from: {"Pleroma", "noreply@example.com"},