memEx/test/memex_web/controllers/error_html_test.exs
shibao 63d854ffbe
All checks were successful
continuous-integration/drone/push Build is passing
upgrade to phoenix 1.7
2023-04-13 23:29:29 -04:00

15 lines
414 B
Elixir

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