cannery/test/cannery_web/controllers/error_json_test.exs
2023-04-14 23:34:11 -04:00

13 lines
348 B
Elixir

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