Current section
Files
Jump to
Current section
Files
templates/inertia-react/test/web/controllers/error_json_test.exs
defmodule MyApp.Web.ErrorJSONTest do
use MyApp.Web.ConnCase, async: true
alias MyApp.Web.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