aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2007-01-28 05:29:32 +0000
committerNicholas Seckar <nseckar@gmail.com>2007-01-28 05:29:32 +0000
commit35ec1c928f100f5b75bd2e6af63d26b10ba2282c (patch)
treeaa90459fb1ca9b4b0ac245a2f65cef1035758be0 /actionpack/test
parentc7f50e9a88c381cc274025c766e2edd1dff34d00 (diff)
downloadrails-35ec1c928f100f5b75bd2e6af63d26b10ba2282c.tar.gz
rails-35ec1c928f100f5b75bd2e6af63d26b10ba2282c.tar.bz2
rails-35ec1c928f100f5b75bd2e6af63d26b10ba2282c.zip
Fix doubly appearing parameters due to string and symbol mixups. Closes #2551.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6053 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/url_rewriter_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/url_rewriter_test.rb b/actionpack/test/controller/url_rewriter_test.rb
index 882add496f..d3bee976a2 100644
--- a/actionpack/test/controller/url_rewriter_test.rb
+++ b/actionpack/test/controller/url_rewriter_test.rb
@@ -17,6 +17,15 @@ class UrlRewriterTests < Test::Unit::TestCase
assert_match %r(/hi/hi/2$), u
end
+ def test_overwrite_removes_original
+ @params[:controller] = 'search'
+ @params[:action] = 'list'
+ @params[:list_page] = 1
+
+ assert_equal '/search/list?list_page=2', @rewriter.rewrite(:only_path => true, :overwrite_params => {"list_page" => 2})
+ u = @rewriter.rewrite(:only_path => false, :overwrite_params => {:list_page => 2})
+ assert_equal 'http://test.host/search/list?list_page=2', u
+ end
private
def split_query_string(str)