Skip to content
Browse files

add tests for symbols passed to polymorphic_url

  • Loading branch information...
1 parent 98baa82 commit bfcbd6fd4cf5f60d8de3824355e0348b0fc91637 @tenderlove tenderlove committed May 7, 2014
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)

0 comments on commit bfcbd6f

Please sign in to comment.
Something went wrong with that request. Please try again.