Update the tests for the error htmls.
continuous-integration/drone/push Build is passing Details

dev
KKlochko 2 months ago
parent 0aa54b8f3e
commit 0415938248

@ -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

Loading…
Cancel
Save