From d1a2449220303f24da0d70504f5959635730da88 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Sat, 9 Dec 2006 04:42:32 +0000 Subject: 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 --- actionpack/test/controller/routing_test.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'actionpack/test/controller') 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 -- cgit v1.2.3