chiya/test/chiya_web/controllers/error_json_test.exs
2023-03-05 16:07:40 +01:00

12 lines
346 B
Elixir

defmodule ChiyaWeb.ErrorJSONTest do
use ChiyaWeb.ConnCase, async: true
test "renders 404" do
assert ChiyaWeb.ErrorJSON.render("404.json", %{}) == %{errors: %{detail: "Not Found"}}
end
test "renders 500" do
assert ChiyaWeb.ErrorJSON.render("500.json", %{}) ==
%{errors: %{detail: "Internal Server Error"}}
end
end