1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-12 01:52:49 +00:00
This commit is contained in:
2017-12-31 20:19:44 -06:00
commit e856cc5172
37 changed files with 1196 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
defmodule MyAppWeb.ErrorViewTest do
use MyAppWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.json" do
assert render(MyAppWeb.ErrorView, "404.json", []) ==
%{errors: %{detail: "Page not found"}}
end
test "render 500.json" do
assert render(MyAppWeb.ErrorView, "500.json", []) ==
%{errors: %{detail: "Internal server error"}}
end
test "render any other" do
assert render(MyAppWeb.ErrorView, "505.json", []) ==
%{errors: %{detail: "Internal server error"}}
end
end