From c1c6f514f482f8880beb8bf6e7471a201ce8af30 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 2 May 2014 14:29:08 -0700 Subject: passing a nil in the polymorphic array is not supported. remove nils before you call the method --- actionview/test/activerecord/polymorphic_routes_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionview') 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 -- cgit v1.2.3