Skip to content
Browse files

test for inconsistency between String and Symbol url_for handling

  • Loading branch information...
1 parent bfcbd6f commit 37d4415a7b433fcb987b1c6a5b51bf2d8efc5d5e @tenderlove tenderlove committed May 7, 2014
Showing with 4 additions and 0 deletions.
  1. +4 −0 actionview/test/activerecord/polymorphic_routes_test.rb
View
4 actionview/test/activerecord/polymorphic_routes_test.rb
@@ -81,7 +81,10 @@ def assert_url(url, args)
def test_string
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 "projects", url_for("projects")
end
end
@@ -94,6 +97,7 @@ def test_string_with_options
def test_symbol
with_test_routes do
assert_equal "http://example.com/projects", polymorphic_url(:projects)
+ assert_equal "http://example.com/projects", url_for(:projects)
end
end

0 comments on commit 37d4415

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