diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-02 14:29:08 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-02 14:29:08 -0700 |
commit | c1c6f514f482f8880beb8bf6e7471a201ce8af30 (patch) | |
tree | 5ac7e02c203096cb78b218829e4af793aee97829 /actionview/test/activerecord | |
parent | 3d87c26845095438b6c946dc4e1029280593fb91 (diff) | |
download | rails-c1c6f514f482f8880beb8bf6e7471a201ce8af30.tar.gz rails-c1c6f514f482f8880beb8bf6e7471a201ce8af30.tar.bz2 rails-c1c6f514f482f8880beb8bf6e7471a201ce8af30.zip |
passing a nil in the polymorphic array is not supported. remove nils before you call the method
Diffstat (limited to 'actionview/test/activerecord')
-rw-r--r-- | actionview/test/activerecord/polymorphic_routes_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb index c1f5a75cd4..1ead18518a 100644 --- a/actionview/test/activerecord/polymorphic_routes_test.rb +++ b/actionview/test/activerecord/polymorphic_routes_test.rb @@ -320,17 +320,17 @@ class PolymorphicRoutesTest < ActionController::TestCase end end - def test_nesting_with_array_containing_nil + def test_nesting_with_array with_test_routes do @project.save - assert_equal "http://example.com/projects/#{@project.id}/bid", polymorphic_url([@project, nil, :bid]) + assert_equal "http://example.com/projects/#{@project.id}/bid", polymorphic_url([@project, :bid]) end end def test_with_array_containing_single_object with_test_routes do @project.save - assert_equal "http://example.com/projects/#{@project.id}", polymorphic_url([nil, @project]) + assert_equal "http://example.com/projects/#{@project.id}", polymorphic_url([@project]) end end @@ -463,7 +463,7 @@ class PolymorphicRoutesTest < ActionController::TestCase def test_with_array_containing_single_irregular_plural_object with_test_routes do @tax.save - assert_equal "http://example.com/taxes/#{@tax.id}", polymorphic_url([nil, @tax]) + assert_equal "http://example.com/taxes/#{@tax.id}", polymorphic_url([@tax]) end end |