memEx/test/memex_web/controllers/error_json_test.exs

13 lines
342 B
Elixir
Raw Normal View History

2023-04-13 23:29:29 -04:00
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