diff --git a/test/test_helper.exs b/test/test_helper.exs index bad7081..ae68067 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -1,3 +1,5 @@ ExUnit.start() Application.put_env(:tower_email, Tower.Email.Mailer, adapter: Swoosh.Adapters.Test) +Application.put_env(:tower_email, :otp_app, :tower_email) +Application.put_env(:tower_email, :environment, :test) diff --git a/test/tower_email_test.exs b/test/tower_email_test.exs index ebc453e..91257a3 100644 --- a/test/tower_email_test.exs +++ b/test/tower_email_test.exs @@ -22,7 +22,10 @@ defmodule TowerEmailTest do # TODO: Support waiting on assert_email_sent with a timeout # Swoosh.TestAssertions.assert_email_sent(subject: "ArithmeticError: bad argument in arithmetic expression") assert_receive( - {:email, %{subject: "ArithmeticError: bad argument in arithmetic expression"}}, + { + :email, + %{subject: "[tower_email][test] ArithmeticError: bad argument in arithmetic expression"} + }, 1_000 ) end