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:
parent
98baa827ac
commit
bfcbd6fd4c
1 changed files with 12 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue