14 lines
402 B
1
defmodule BlogWeb.ErrorHTMLTest do
2
use BlogWeb.ConnCase, async: true
3
4
# Bring render_to_string/4 for testing custom views
5
import Phoenix.Template
6
7
test "renders 404.html" do
8
assert render_to_string(BlogWeb.ErrorHTML, "404", "html", []) == "Not Found"
9
end
10
11
test "renders 500.html" do
12
assert render_to_string(BlogWeb.ErrorHTML, "500", "html", []) == "Internal Server Error"
13
end
14
end
15