From de6cda5e5fab17bd087b7fd6b6fa7a6cfa738ef1 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 8 May 2014 10:33:57 -0700 Subject: add more tests around the polymorphic url api --- actionview/test/activerecord/polymorphic_routes_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb index a42888d873..e7769c7ce5 100644 --- a/actionview/test/activerecord/polymorphic_routes_test.rb +++ b/actionview/test/activerecord/polymorphic_routes_test.rb @@ -183,6 +183,12 @@ class PolymorphicRoutesTest < ActionController::TestCase end end + def test_with_class_list_of_one + with_test_routes do + assert_url "http://example.com/projects", [@project.class] + end + end + def test_with_new_record with_test_routes do assert_url "http://example.com/projects", @project @@ -389,6 +395,12 @@ class PolymorphicRoutesTest < ActionController::TestCase end end + def test_with_array_containing_single_string_name + with_test_routes do + assert_url "http://example.com/projects", ["projects"] + end + end + def test_with_array_containing_symbols with_test_routes do assert_url "http://example.com/series/new", [:new, :series] -- cgit v1.2.3