From db083299465bdb89297e180e9635d4ea102c8e19 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 17 Mar 2008 23:45:42 +0000 Subject: Fixed that polymorphic routes would modify the input array (closes #11363) [thomas.lee] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9053 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/polymorphic_routes_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/polymorphic_routes_test.rb b/actionpack/test/controller/polymorphic_routes_test.rb index 90c149a830..0d349a360c 100644 --- a/actionpack/test/controller/polymorphic_routes_test.rb +++ b/actionpack/test/controller/polymorphic_routes_test.rb @@ -125,5 +125,12 @@ uses_mocha 'polymorphic URL helpers' do polymorphic_path(@article, :action => :new) end + def test_polymorphic_path_does_not_modify_arguments + expects(:admin_article_responses_url).with(@article) + path = [:admin, @article, @response] + assert_no_difference 'path.size' do + polymorphic_url(path) + end + end end end -- cgit v1.2.3