mitgliederverwaltung/test/mv_web/locale_test.exs
Moritz 548bfb55ca
All checks were successful
continuous-integration/drone/push Build is passing
add further locale tests
2025-06-18 17:44:37 +02:00

14 lines
489 B
Elixir

defmodule MvWeb.LocaleTest do
use MvWeb.ConnCase, async: true
import Phoenix.ConnTest
test "language switch via form sets the locale to English in the session" do
conn = post(build_conn(), "/set_locale", %{"locale" => "en"})
assert get_session(conn, :locale) == "en"
end
test "language switch via form sets the locale to German in the session" do
conn = post(build_conn(), "/set_locale", %{"locale" => "de"})
assert get_session(conn, :locale) == "de"
end
end