aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-03-26 12:14:21 +0100
committerYves Senn <yves.senn@gmail.com>2013-03-26 12:14:21 +0100
commitd5f4cac68c069a3caff1712fd967ed70a4eb52da (patch)
tree2224af5040e70e66f7d6f04ef28bd2784a41b1fe /actionpack/test/dispatch/routing_test.rb
parent078bfbffa41e29a9d8ff2cf56e4c9254e7260f24 (diff)
downloadrails-d5f4cac68c069a3caff1712fd967ed70a4eb52da.tar.gz
rails-d5f4cac68c069a3caff1712fd967ed70a4eb52da.tar.bz2
rails-d5f4cac68c069a3caff1712fd967ed70a4eb52da.zip
bugfix, when matching multiple paths with `get`, `post`, ...
This problem was introduced with: https://github.com/rails/rails/commit/d03aa104e069be4e301efa8cefb90a2a785a7bff
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index df359ba77d..6dde183222 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -1112,6 +1112,21 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal 'projects#info', @response.body
end
+ def test_match_with_many_paths_containing_a_slash
+ draw do
+ get 'get/first', 'get/second', 'get/third', :to => 'get#show'
+ end
+
+ get '/get/first'
+ assert_equal 'get#show', @response.body
+
+ get '/get/second'
+ assert_equal 'get#show', @response.body
+
+ get '/get/third'
+ assert_equal 'get#show', @response.body
+ end
+
def test_match_shorthand_with_no_scope
draw do
get 'account/overview'