summaryrefslogtreecommitdiff
path: root/test/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'test/controllers')
-rw-r--r--test/controllers/admin_controller_test.rb14
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
61end 75end