Skip to content

Commit

Permalink
Better testing of shell messages
Browse files Browse the repository at this point in the history
  • Loading branch information
danschultzer committed Feb 28, 2019
1 parent c60fb10 commit 6b897b8
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ defmodule Mix.Tasks.PowAssent.Phoenix.Gen.TemplatesTest do
assert view_content =~ "defmodule PowAssentWeb.PowAssent.RegistrationView do"
assert view_content =~ "use PowAssentWeb, :view"

for _ <- 1..2, do: assert_received({:mix_shell, :info, [_msg]})
assert_received {:mix_shell, :info, [msg]}
assert_received {:mix_shell, :info, ["PowAssent Phoenix templates and views has been generated." <> msg]}
assert msg =~ "defmodule PowAssentWeb.Endpoint"
assert msg =~ "otp_app: :pow"
assert msg =~ "repo: PowAssent.Repo"
Expand All @@ -66,8 +65,7 @@ defmodule Mix.Tasks.PowAssent.Phoenix.Gen.TemplatesTest do
assert view_content =~ "defmodule TestWeb.PowAssent.RegistrationView do"
assert view_content =~ "use TestWeb, :view"

for _ <- 1..2, do: assert_received({:mix_shell, :info, [_msg]})
assert_received {:mix_shell, :info, [msg]}
assert_received {:mix_shell, :info, ["PowAssent Phoenix templates and views has been generated." <> msg]}
assert msg =~ "defmodule TestWeb.Endpoint"
assert msg =~ "otp_app: :test"
assert msg =~ "repo: Test.Repo"
Expand Down

0 comments on commit 6b897b8

Please sign in to comment.