Permalink
Browse files

add more tests around the polymorphic url api

  • Loading branch information...
1 parent 6ffce17 commit de6cda5e5fab17bd087b7fd6b6fa7a6cfa738ef1 @tenderlove tenderlove committed May 8, 2014
Showing with 12 additions and 0 deletions.
  1. +12 −0 actionview/test/activerecord/polymorphic_routes_test.rb
@@ -183,6 +183,12 @@ def test_with_class
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 @@ def test_with_array_containing_single_name
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]

0 comments on commit de6cda5

Please sign in to comment.