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
|