提交 de6cda5e 编写于 作者: A Aaron Patterson

add more tests around the polymorphic url api

上级 6ffce179
......@@ -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]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册