This commit is contained in:
@@ -5,11 +5,18 @@ defmodule DecentralisedBookIndexWeb.ErrorHTMLTest do
|
||||
import Phoenix.Template
|
||||
|
||||
test "renders 404.html" do
|
||||
assert render_to_string(DecentralisedBookIndexWeb.ErrorHTML, "404", "html", []) == "Not Found"
|
||||
html = render_to_string(DecentralisedBookIndexWeb.ErrorHTML, "404", "html", [])
|
||||
assert html =~ "404"
|
||||
assert html =~ "Something's missing."
|
||||
assert html =~ "Sorry, we can't find that page."
|
||||
assert html =~ "Go to books"
|
||||
end
|
||||
|
||||
test "renders 500.html" do
|
||||
assert render_to_string(DecentralisedBookIndexWeb.ErrorHTML, "500", "html", []) ==
|
||||
"Internal Server Error"
|
||||
html = render_to_string(DecentralisedBookIndexWeb.ErrorHTML, "500", "html", [])
|
||||
assert html =~ "500"
|
||||
assert html =~ "Something's went wrong."
|
||||
assert html =~ "Try to refresh the page. Feel free to contact us if the problem persists."
|
||||
assert html =~ "Go to books"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user