From 6c20570d2a4c6cb698d0a08dbcb86ecc2a25a131 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 27 Jul 2026 11:16:14 +0200 Subject: Pin admin content reads to the default locale --- test/controllers/admin_controller_test.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/controllers/admin_controller_test.rb') diff --git a/test/controllers/admin_controller_test.rb b/test/controllers/admin_controller_test.rb index 9747d8e9..ec0bd598 100644 --- a/test/controllers/admin_controller_test.rb +++ b/test/controllers/admin_controller_test.rb @@ -58,4 +58,18 @@ class AdminControllerTest < ActionController::TestCase get :index assert_response :success end + + + test "the dashboard reads default-locale titles under the English chrome locale" do + login_as :quentin + node = Node.root.children.create!(:slug => "pin_locale_check") + Globalize.with_locale(:de) { node.draft.update!(:title => "Deutscher Titel") } + Globalize.with_locale(:en) { node.draft.update!(:title => "English title") } + + get :index, params: { locale: "en" } + + assert_response :success + assert_match "Deutscher Titel", response.body + assert_no_match /English title/, response.body + end end -- cgit v1.3