"""
end
diff --git a/lib/mv_web/live/global_settings_live.ex b/lib/mv_web/live/global_settings_live.ex
index a55edf6..752c8d6 100644
--- a/lib/mv_web/live/global_settings_live.ex
+++ b/lib/mv_web/live/global_settings_live.ex
@@ -34,8 +34,8 @@ defmodule MvWeb.GlobalSettingsLive do
def mount(_params, session, socket) do
{:ok, settings} = Membership.get_settings()
- # Get locale from session for translations
- locale = session["locale"] || "de"
+ # Get locale from session; same fallback as router/LiveUserAuth (respects config :default_locale in test)
+ locale = session["locale"] || Application.get_env(:mv, :default_locale, "de")
Gettext.put_locale(MvWeb.Gettext, locale)
socket =
@@ -407,6 +407,7 @@ defmodule MvWeb.GlobalSettingsLive do
|> assign(:settings, fresh_settings)
|> assign(:vereinfacht_api_key_set, present?(fresh_settings.vereinfacht_api_key))
|> assign(:oidc_client_secret_set, present?(fresh_settings.oidc_client_secret))
+ |> assign(:oidc_configured, Mv.Config.oidc_configured?())
|> assign(:vereinfacht_test_result, test_result)
|> put_flash(:info, gettext("Settings updated successfully"))
|> assign_form()
diff --git a/test/mv_web/controllers/auth_controller_test.exs b/test/mv_web/controllers/auth_controller_test.exs
index c75364b..f31327c 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" or html_response(conn, 200) =~ "Anmelden"
+ assert html_response(conn, 200) =~ "Sign in"
end
test "GET /sign-out redirects to home", %{conn: authenticated_conn} do
@@ -82,8 +82,7 @@ defmodule MvWeb.AuthControllerTest do
)
|> render_submit()
- assert html =~ "Email or password was incorrect" or
- html =~ "Email oder Passwort nicht korrekt"
+ assert html =~ "Email or password was incorrect"
end
test "password user with non-existent email shows error via LiveView", %{
@@ -101,8 +100,7 @@ defmodule MvWeb.AuthControllerTest do
)
|> render_submit()
- assert html =~ "Email or password was incorrect" or
- html =~ "Email oder Passwort nicht korrekt"
+ assert html =~ "Email or password was incorrect"
end
# Registration (LiveView)