diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-06-17 00:25:24 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-06-17 00:25:24 +0000 |
commit | 2bbcff8cf4488c0f64bf5ac23e9b5a8eb13f07d5 (patch) | |
tree | 4dfbb6fed967bb9508748416bbfb44e1c7486217 /actionpack/test | |
parent | 36dc94a6a1e742848c5a80975b8bf5d216f54022 (diff) | |
download | rails-2bbcff8cf4488c0f64bf5ac23e9b5a8eb13f07d5.tar.gz rails-2bbcff8cf4488c0f64bf5ac23e9b5a8eb13f07d5.tar.bz2 rails-2bbcff8cf4488c0f64bf5ac23e9b5a8eb13f07d5.zip |
Fix that routes with *path segments in the recall can generate URLs. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4454 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index b2c3ebf410..e6d42c823f 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -214,6 +214,15 @@ class LegacyRouteSetTests < Test::Unit::TestCase assert_equal '/pages/boo', rs.generate(:controller => 'content', :action => 'show_file', :path => %w(pages boo)) end + def test_dynamic_recall_paths_allowed + rs.draw do |map| + map.connect '*path', :controller => 'content', :action => 'show_file' + end + + recall_path = ActionController::Routing::PathSegment::Result.new(%w(pages boo)) + assert_equal '/pages/boo', rs.generate({}, :controller => 'content', :action => 'show_file', :path => recall_path) + end + def test_backwards rs.draw do |map| map.connect 'page/:id/:action', :controller => 'pages', :action => 'show' |