1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

add tests for symbols passed to polymorphic_url

This commit is contained in:
Aaron Patterson 2014-05-07 09:55:57 -07:00
parent 98baa827ac
commit bfcbd6fd4c

View file

@ -91,6 +91,18 @@ class PolymorphicRoutesTest < ActionController::TestCase
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)