aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionview/test/activerecord/polymorphic_routes_test.rb12
1 files changed, 12 insertions, 0 deletions
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]