diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2007-01-28 05:29:32 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2007-01-28 05:29:32 +0000 |
commit | 35ec1c928f100f5b75bd2e6af63d26b10ba2282c (patch) | |
tree | aa90459fb1ca9b4b0ac245a2f65cef1035758be0 /actionpack/test/controller | |
parent | c7f50e9a88c381cc274025c766e2edd1dff34d00 (diff) | |
download | rails-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/controller')
-rw-r--r-- | actionpack/test/controller/url_rewriter_test.rb | 9 |
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) |