diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/activerecord/polymorphic_routes_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/activerecord/polymorphic_routes_test.rb b/actionpack/test/activerecord/polymorphic_routes_test.rb index afb714484b..3e6dce9590 100644 --- a/actionpack/test/activerecord/polymorphic_routes_test.rb +++ b/actionpack/test/activerecord/polymorphic_routes_test.rb @@ -309,6 +309,20 @@ class PolymorphicRoutesTest < ActionController::TestCase end end + def test_with_array_containing_simple_hash + with_test_routes do + @project.save + assert_equal "http://example.com/projects/#{@project.id}?foo=bar", polymorphic_url([@project, :foo => 'bar' ]) + end + end + + def test_with_array_containing_complex_hash + with_test_routes do + @project.save + assert_equal "http://example.com/projects/#{@project.id}?foo=bar&nested%5Bfoo%5D=bar", polymorphic_url([@project, :nested => { :foo => 'bar' }, :foo => 'bar']) + end + end + def test_with_array_containing_single_name with_test_routes do @project.save |