diff options
author | =?utf-8?q?Mislav=20Marohni=C4=87?= <mislav.marohnic@gmail.com> | 2009-06-21 17:53:07 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-06-21 17:53:07 +0100 |
commit | 21cd4c0e93fc6ac5497ada787d286c07f627e5ba (patch) | |
tree | 324c50a76105370b6607b88972a5c804a4557ff5 /actionpack/test/activerecord | |
parent | 83c1934003740ed01c618a8943457a0df53e2adb (diff) | |
download | rails-21cd4c0e93fc6ac5497ada787d286c07f627e5ba.tar.gz rails-21cd4c0e93fc6ac5497ada787d286c07f627e5ba.tar.bz2 rails-21cd4c0e93fc6ac5497ada787d286c07f627e5ba.zip |
Fix polymorphic_path doesn't modify options hash [#2099 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/test/activerecord')
-rw-r--r-- | actionpack/test/activerecord/polymorphic_routes_test.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/test/activerecord/polymorphic_routes_test.rb b/actionpack/test/activerecord/polymorphic_routes_test.rb index b9f5be2361..2036d1eeb5 100644 --- a/actionpack/test/activerecord/polymorphic_routes_test.rb +++ b/actionpack/test/activerecord/polymorphic_routes_test.rb @@ -234,10 +234,13 @@ class PolymorphicRoutesTest < ActionController::TestCase with_admin_test_routes do @project.save @task.save + + options = {} object_array = [:admin, @project, @task] - assert_no_difference 'object_array.size' do - polymorphic_url(object_array) - end + original_args = [object_array.dup, options.dup] + + assert_no_difference('object_array.size') { polymorphic_path(object_array, options) } + assert_equal original_args, [object_array, options] end end |