memEx/test/memex_web/controllers/error_html_test.exs

15 lines
414 B
Elixir
Raw Normal View History

2023-04-13 23:29:29 -04:00
defmodule MemexWeb.ErrorHTMLTest do
use MemexWeb.ConnCase, async: true
# Bring render_to_string/4 for testing custom views
import Phoenix.Template
alias MemexWeb.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