Initial commit: there's still tons of base Phoenix boilerplate to remove, but the...
[tech-radar-editor.git] / test / views / error_view_test.exs
1 defmodule TechRadarEditor.ErrorViewTest do
2 use TechRadarEditor.ConnCase, async: true
3
4 # Bring render/3 and render_to_string/3 for testing custom views
5 import Phoenix.View
6
7 test "renders 404.html" do
8 assert render_to_string(TechRadarEditor.ErrorView, "404.html", []) ==
9 "Page not found"
10 end
11
12 test "render 500.html" do
13 assert render_to_string(TechRadarEditor.ErrorView, "500.html", []) ==
14 "Internal server error"
15 end
16
17 test "render any other" do
18 assert render_to_string(TechRadarEditor.ErrorView, "505.html", []) ==
19 "Internal server error"
20 end
21 end