aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-03-26 12:19:46 +0100
committerYves Senn <yves.senn@gmail.com>2013-03-26 12:30:25 +0100
commit69e87f5994f74eef02fdfd7912ae81a334d74218 (patch)
tree3fbd2b9e7e9d819866b6a4cf21d27c48744ce269 /actionpack/test/dispatch/routing_test.rb
parentd5f4cac68c069a3caff1712fd967ed70a4eb52da (diff)
downloadrails-69e87f5994f74eef02fdfd7912ae81a334d74218.tar.gz
rails-69e87f5994f74eef02fdfd7912ae81a334d74218.tar.bz2
rails-69e87f5994f74eef02fdfd7912ae81a334d74218.zip
routing shorthand syntax works with multiple paths
Closes #9913. We need to expand the match shorthand syntax for every path.
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 6dde183222..6eb9d019df 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -1149,6 +1149,20 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal 'account#shorthand', @response.body
end
+ def test_match_shorthand_with_multiple_paths_inside_namespace
+ draw do
+ namespace :proposals do
+ put 'activate', 'inactivate'
+ end
+ end
+
+ put '/proposals/activate'
+ assert_equal 'proposals#activate', @response.body
+
+ put '/proposals/inactivate'
+ assert_equal 'proposals#inactivate', @response.body
+ end
+
def test_match_shorthand_inside_namespace_with_controller
draw do
namespace :api do