aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorSam Ruby <rubys@intertwingly.net>2013-09-24 09:45:36 -0400
committerSam Ruby <rubys@intertwingly.net>2013-09-24 09:45:36 -0400
commitac1613e5dfc4c789049f5c4c02f6cc384aa1030b (patch)
treef160439f08006710c9cc35e63bf8075833bb2a52 /actionpack
parenteb69a1098c42dbe7b48fa728bd1a1f0dca093615 (diff)
downloadrails-ac1613e5dfc4c789049f5c4c02f6cc384aa1030b.tar.gz
rails-ac1613e5dfc4c789049f5c4c02f6cc384aa1030b.tar.bz2
rails-ac1613e5dfc4c789049f5c4c02f6cc384aa1030b.zip
add test_scoped_root_as_name
test for regression introduced by https://github.com/rails/rails/pull/9155
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/dispatch/routing_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index e4c3ddd3f9..3e9e90a950 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -1102,6 +1102,19 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal 'projects#index', @response.body
end
+ def test_scoped_root_as_name
+ draw do
+ scope '(:locale)', :locale => /en|pl/ do
+ root :to => 'projects#index', :as => 'projects'
+ end
+ end
+
+ assert_equal '/en', projects_path(:locale => 'en')
+ assert_equal '/', projects_path
+ get '/en'
+ assert_equal 'projects#index', @response.body
+ end
+
def test_scope_with_format_option
draw do
get "direct/index", as: :no_format_direct, format: false