memEx/test/memex_web/controllers/error_json_test.exs
shibao 63d854ffbe
All checks were successful
continuous-integration/drone/push Build is passing
upgrade to phoenix 1.7
2023-04-13 23:29:29 -04:00

13 lines
342 B
Elixir

defmodule MemexWeb.ErrorJSONTest do
use MemexWeb.ConnCase, async: true
alias MemexWeb.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