MailerTest: Give it some time.
authorlain <lain@soykaf.club>
Wed, 5 Aug 2020 15:26:03 +0000 (17:26 +0200)
committerlain <lain@soykaf.club>
Wed, 5 Aug 2020 15:26:03 +0000 (17:26 +0200)
test/emails/mailer_test.exs

index e6e34cba8a3eba3f9efc98cb6ae2f9091e8b3cb5..3da45056bed564d0dbce77f7de2b6ba5f8c88e8d 100644 (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 @@ defmodule Pleroma.Emails.MailerTest do
 
   test "send email" do
     Mailer.deliver(@email)
+    :timer.sleep(100)
 
     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, [])
+    :timer.sleep(100)
 
     assert_email_sent(
       from: {"Pleroma", "noreply@example.com"},