cannery/test/cannery_web/controllers/error_json_test.exs

13 lines
348 B
Elixir
Raw Normal View History

2023-04-14 23:34:11 -04:00
defmodule CanneryWeb.ErrorJSONTest do
use CanneryWeb.ConnCase, async: true
alias CanneryWeb.ErrorJSON
test "renders 404" do
assert ErrorJSON.render("404.json", %{}) == %{errors: %{detail: "Not found"}}
end
test "renders 500" do
assert ErrorJSON.render("500.json", %{}) == %{errors: %{detail: "Internal server error"}}
end
end