From 951d01dc4de559ffa44b4aff0b1269137c47cff4 Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 24 Feb 2026 15:07:53 +0100 Subject: [PATCH] Tests: accept DE or EN in auth controller sign-in and error assertions --- test/mv_web/controllers/auth_controller_test.exs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/mv_web/controllers/auth_controller_test.exs b/test/mv_web/controllers/auth_controller_test.exs index f31327c..c75364b 100644 --- a/test/mv_web/controllers/auth_controller_test.exs +++ b/test/mv_web/controllers/auth_controller_test.exs @@ -25,7 +25,7 @@ defmodule MvWeb.AuthControllerTest do # Create unauthenticated conn for this test conn = build_unauthenticated_conn(authenticated_conn) conn = get(conn, ~p"/sign-in") - assert html_response(conn, 200) =~ "Sign in" + assert html_response(conn, 200) =~ "Sign in" or html_response(conn, 200) =~ "Anmelden" end test "GET /sign-out redirects to home", %{conn: authenticated_conn} do @@ -82,7 +82,8 @@ defmodule MvWeb.AuthControllerTest do ) |> render_submit() - assert html =~ "Email or password was incorrect" + assert html =~ "Email or password was incorrect" or + html =~ "Email oder Passwort nicht korrekt" end test "password user with non-existent email shows error via LiveView", %{ @@ -100,7 +101,8 @@ defmodule MvWeb.AuthControllerTest do ) |> render_submit() - assert html =~ "Email or password was incorrect" + assert html =~ "Email or password was incorrect" or + html =~ "Email oder Passwort nicht korrekt" end # Registration (LiveView)