Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add tests for symbols passed to polymorphic_url

  • Loading branch information...
commit bfcbd6fd4cf5f60d8de3824355e0348b0fc91637 1 parent 98baa82
@tenderlove tenderlove authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 actionview/test/activerecord/polymorphic_routes_test.rb
View
12 actionview/test/activerecord/polymorphic_routes_test.rb
@@ -91,6 +91,18 @@ def test_string_with_options
end
end
+ def test_symbol
+ with_test_routes do
+ assert_equal "http://example.com/projects", polymorphic_url(:projects)
+ end
+ end
+
+ def test_symbol_with_options
+ with_test_routes do
+ assert_equal "http://example.com/projects?id=10", polymorphic_url(:projects, :id => 10)
+ end
+ end
+
def test_passing_routes_proxy
with_namespaced_routes(:blog) do
proxy = ActionDispatch::Routing::RoutesProxy.new(_routes, self)
Please sign in to comment.
Something went wrong with that request. Please try again.