Apologies if the offending code/macro/function does not belong to this repo. This happened inside my phoenix project so I figured it belonged here.
Environment
- Elixir version (elixir -v): Elixir 1.2.2
- Phoenix version (mix deps): phoenix 1.1.4
- NodeJS version (node -v): v5.5.0
- NPM version (npm -v): 3.5.3
- Operating system:
{:unix, :darwin} - OSX Yosemite 10.10.5 (14F27)
Expected behavior
In a newly generated test the following test should pass without incident:
test "does not show resource and instead throw error when id is nonexistent", %{conn: conn} do
assert_error_sent 404, fn ->
get conn, user_path(conn, :show, -1)
end
end
Actual behavior
1) test does not show resource and instead throw error when id is nonexistent (MyApp.UserControllerTest)
test/controllers/user_controller_test.exs:45
expected error to be sent as 404 status, but response sent 404 without error
stacktrace:
(phoenix) lib/phoenix/test/conn_test.ex:531: Phoenix.ConnTest.assert_error_sent/2
test/controllers/user_controller_test.exs:46
Apologies if the offending code/macro/function does not belong to this repo. This happened inside my phoenix project so I figured it belonged here.
Environment
{:unix, :darwin} - OSX Yosemite 10.10.5 (14F27)Expected behavior
In a newly generated test the following test should pass without incident:
Actual behavior