diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-27 11:16:14 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-27 11:16:14 +0200 |
| commit | 6c20570d2a4c6cb698d0a08dbcb86ecc2a25a131 (patch) | |
| tree | de502ac778d4a98c927ebaf02cb2338da551e976 /test/controllers | |
| parent | 180b5feba092db1339f7bb3217e91f0b22239bc5 (diff) | |
Pin admin content reads to the default locale
Diffstat (limited to 'test/controllers')
| -rw-r--r-- | test/controllers/admin_controller_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
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 | |||
| 58 | get :index | 58 | get :index |
| 59 | assert_response :success | 59 | assert_response :success |
| 60 | end | 60 | end |
| 61 | |||
| 62 | |||
| 63 | test "the dashboard reads default-locale titles under the English chrome locale" do | ||
| 64 | login_as :quentin | ||
| 65 | node = Node.root.children.create!(:slug => "pin_locale_check") | ||
| 66 | Globalize.with_locale(:de) { node.draft.update!(:title => "Deutscher Titel") } | ||
| 67 | Globalize.with_locale(:en) { node.draft.update!(:title => "English title") } | ||
| 68 | |||
| 69 | get :index, params: { locale: "en" } | ||
| 70 | |||
| 71 | assert_response :success | ||
| 72 | assert_match "Deutscher Titel", response.body | ||
| 73 | assert_no_match /English title/, response.body | ||
| 74 | end | ||
| 61 | end | 75 | end |
