chiya/test/chiya_web/controllers/error_html_test.exs

15 lines
406 B
Elixir
Raw Normal View History

2023-03-05 16:07:40 +01:00
defmodule ChiyaWeb.ErrorHTMLTest do
use ChiyaWeb.ConnCase, async: true
# Bring render_to_string/4 for testing custom views
import Phoenix.Template
test "renders 404.html" do
2023-07-09 20:01:03 +02:00
assert render_to_string(ChiyaWeb.ErrorHTML, "404", "html", []) =~ "Not Found"
2023-03-05 16:07:40 +01:00
end
test "renders 500.html" do
2023-07-16 16:40:33 +02:00
assert render_to_string(ChiyaWeb.ErrorHTML, "500", "html", []) =~ "Infernal Server Error"
2023-03-05 16:07:40 +01:00
end
end