From 69e87f5994f74eef02fdfd7912ae81a334d74218 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Tue, 26 Mar 2013 12:19:46 +0100 Subject: routing shorthand syntax works with multiple paths Closes #9913. We need to expand the match shorthand syntax for every path. --- actionpack/test/dispatch/routing_test.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'actionpack/test/dispatch') 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 -- cgit v1.2.3