-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use TestMessageProxy for assert receive tests
- Loading branch information
Showing
4 changed files
with
17 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ defmodule ErrorInfoTest do | |
options: [ | ||
mailer: Support.BambooFakeMailer, | ||
from: "[email protected]", | ||
to: to_string(ErrorInfoTest), | ||
to: to_string(BoomNotifier.TestMessageProxy), | ||
subject: "BOOM error caught" | ||
] | ||
|
||
|
@@ -71,7 +71,6 @@ defmodule ErrorInfoTest do | |
end | ||
|
||
setup do | ||
Process.register(self(), ErrorInfoTest) | ||
Logger.metadata(name: "Dennis", age: 17) | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,7 @@ defmodule MailerNotifierTest do | |
options: [ | ||
mailer: @fake_mailer_module, | ||
from: "[email protected]", | ||
to: to_string(MailerNotifierTest), | ||
to: to_string(BoomNotifier.TestMessageProxy), | ||
subject: "BOOM error caught" | ||
], | ||
custom_data: [:assigns, :logger] | ||
|
@@ -101,7 +101,7 @@ defmodule MailerNotifierTest do | |
options: [ | ||
mailer: @fake_mailer_module, | ||
from: "[email protected]", | ||
to: to_string(MailerNotifierTest), | ||
to: to_string(BoomNotifier.TestMessageProxy), | ||
subject: "BOOM error caught", | ||
max_subject_length: 25 | ||
] | ||
|
@@ -115,7 +115,6 @@ defmodule MailerNotifierTest do | |
:elixir_config.put(:ignore_module_conflict, false) | ||
|
||
setup do | ||
Process.register(self(), MailerNotifierTest) | ||
Logger.metadata(name: "Dennis", age: 17) | ||
|
||
on_exit(&flush_messages/0) | ||
|
@@ -158,7 +157,7 @@ defmodule MailerNotifierTest do | |
test "Set email using proper from and to addresses" do | ||
conn = conn(:get, "/") | ||
catch_error(TestRouter.call(conn, [])) | ||
email_to = MailerNotifierTest |> to_string() | ||
email_to = BoomNotifier.TestMessageProxy |> to_string() | ||
|
||
assert_receive({:email_from, "[email protected]"}, @receive_timeout) | ||
assert_receive({:email_to, ^email_to}, @receive_timeout) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters