diff options
Diffstat (limited to 'test/nulla_web/controllers/error_json_test.exs')
-rw-r--r-- | test/nulla_web/controllers/error_json_test.exs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/nulla_web/controllers/error_json_test.exs b/test/nulla_web/controllers/error_json_test.exs new file mode 100644 index 0000000..0734e4d --- /dev/null +++ b/test/nulla_web/controllers/error_json_test.exs @@ -0,0 +1,12 @@ +defmodule NullaWeb.ErrorJSONTest do + use NullaWeb.ConnCase, async: true + + test "renders 404" do + assert NullaWeb.ErrorJSON.render("404.json", %{}) == %{errors: %{detail: "Not Found"}} + end + + test "renders 500" do + assert NullaWeb.ErrorJSON.render("500.json", %{}) == + %{errors: %{detail: "Internal Server Error"}} + end +end |