cannery/test/cannery_web/controllers/error_html_test.exs

15 lines
420 B
Elixir
Raw Normal View History

2023-04-14 23:34:11 -04:00
defmodule CanneryWeb.ErrorHTMLTest do
use CanneryWeb.ConnCase, async: true
# Bring render_to_string/4 for testing custom views
import Phoenix.Template
alias CanneryWeb.ErrorHTML
test "renders 404.html" do
assert render_to_string(ErrorHTML, "404", "html", []) =~ "Not found"
end
test "renders 500.html" do
assert render_to_string(ErrorHTML, "500", "html", []) =~ "Internal server error"
end
end