Fix lang not detected on fallback pages

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-06-09 16:08:03 +02:00
parent 4ff936ad7a
commit ecbc5993c4
3 changed files with 12 additions and 11 deletions

View File

@@ -6,9 +6,13 @@ defmodule Mobilizon.Web.ErrorViewTest do
alias Mobilizon.Web.ErrorView
test "renders 404.html" do
test "renders 404.html", %{conn: conn} do
# Produced HTML might have new lines inside
assert Regex.replace(~r/(\r\n|\n|\r) +/, render_to_string(ErrorView, "404.html", []), " ") =~
assert Regex.replace(
~r/(\r\n|\n|\r) +/,
render_to_string(ErrorView, "404.html", %{conn: conn}),
" "
) =~
"We're sorry but mobilizon doesn't work properly without JavaScript enabled. Please enable it to continue."
end