mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
test for inconsistency between String and Symbol url_for handling
This commit is contained in:
parent
bfcbd6fd4c
commit
37d4415a7b
1 changed files with 4 additions and 0 deletions
|
@ -81,7 +81,10 @@ class PolymorphicRoutesTest < ActionController::TestCase
|
||||||
|
|
||||||
def test_string
|
def test_string
|
||||||
with_test_routes do
|
with_test_routes do
|
||||||
|
# FIXME: why are these different? Symbol case passes through to
|
||||||
|
# `polymorphic_url`, but the String case doesn't.
|
||||||
assert_equal "http://example.com/projects", polymorphic_url("projects")
|
assert_equal "http://example.com/projects", polymorphic_url("projects")
|
||||||
|
assert_equal "projects", url_for("projects")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -94,6 +97,7 @@ class PolymorphicRoutesTest < ActionController::TestCase
|
||||||
def test_symbol
|
def test_symbol
|
||||||
with_test_routes do
|
with_test_routes do
|
||||||
assert_equal "http://example.com/projects", polymorphic_url(:projects)
|
assert_equal "http://example.com/projects", polymorphic_url(:projects)
|
||||||
|
assert_equal "http://example.com/projects", url_for(:projects)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue