aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-11-25 11:49:51 +0100
committerJosé Valim <jose.valim@gmail.com>2010-11-25 11:50:29 +0100
commit731ca00b484379661786fac36c17db7e085603c4 (patch)
tree200e427ad81f8b79e08d280d5dce812e928fe3a2 /actionpack/test/dispatch/routing_test.rb
parent90b0f6149160e6fedb12ea54f713ec3399bebec8 (diff)
downloadrails-731ca00b484379661786fac36c17db7e085603c4.tar.gz
rails-731ca00b484379661786fac36c17db7e085603c4.tar.bz2
rails-731ca00b484379661786fac36c17db7e085603c4.zip
Dynamically generaeted helpers on collection should not clobber resources url helper [#6028 state:resolved]
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 0ac8c249cb..bbd010ea6d 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -155,6 +155,11 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
end
resources :replies do
+ collection do
+ get 'page/:page' => 'replies#index', :page => %r{\d+}
+ get ':page' => 'replies#index', :page => %r{\d+}
+ end
+
new do
post :preview
end
@@ -1241,6 +1246,12 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
end
end
+ def test_dynamically_generated_helpers_on_collection_do_not_clobber_resources_url_helper
+ with_test_routes do
+ assert_equal '/replies', replies_path
+ end
+ end
+
def test_scoped_controller_with_namespace_and_action
with_test_routes do
assert_equal '/account/twitter/callback', account_callback_path("twitter")