Skip to content

Commit

Permalink
add more tests around the polymorphic url api
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed May 8, 2014
1 parent 6ffce17 commit de6cda5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions actionview/test/activerecord/polymorphic_routes_test.rb
Expand Up @@ -183,6 +183,12 @@ def test_with_class
end end
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 def test_with_new_record
with_test_routes do with_test_routes do
assert_url "http://example.com/projects", @project assert_url "http://example.com/projects", @project
Expand Down Expand Up @@ -389,6 +395,12 @@ def test_with_array_containing_single_name
end end
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 def test_with_array_containing_symbols
with_test_routes do with_test_routes do
assert_url "http://example.com/series/new", [:new, :series] assert_url "http://example.com/series/new", [:new, :series]
Expand Down

0 comments on commit de6cda5

Please sign in to comment.