aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2006-12-09 04:42:32 +0000
committerNicholas Seckar <nseckar@gmail.com>2006-12-09 04:42:32 +0000
commitd1a2449220303f24da0d70504f5959635730da88 (patch)
treeceeff500414011255dc8cea82cbf108d79eb48f8 /actionpack/test/controller/routing_test.rb
parenta50fc11583ee723e88dee59590496ddf1433e656 (diff)
downloadrails-d1a2449220303f24da0d70504f5959635730da88.tar.gz
rails-d1a2449220303f24da0d70504f5959635730da88.tar.bz2
rails-d1a2449220303f24da0d70504f5959635730da88.zip
Fix a bug in Routing where a parameter taken from the path of the current request could not be used as a query parameter for the next. Closes #6752.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5709 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index 9e48b5391d..43397dee35 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -1687,6 +1687,17 @@ class RouteSetTest < Test::Unit::TestCase
)
end
+ def test_query_params_will_be_shown_when_recalled
+ set.draw do |map|
+ map.connect 'show_post/:parameter', :controller => 'post', :action => 'show'
+ map.connect ':controller/:action/:id'
+ end
+ assert_equal '/post/edit?parameter=1', set.generate(
+ {:action => 'edit', :parameter => 1},
+ {:controller => 'post', :action => 'show', :parameter => 1}
+ )
+ end
+
end
class RoutingTest < Test::Unit::TestCase