aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/activerecord/polymorphic_routes_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-07 10:18:18 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-05-07 10:18:18 -0700
commit37d4415a7b433fcb987b1c6a5b51bf2d8efc5d5e (patch)
tree539ce1231f50caa34641a947fb9dc5463755a94f /actionview/test/activerecord/polymorphic_routes_test.rb
parentbfcbd6fd4cf5f60d8de3824355e0348b0fc91637 (diff)
downloadrails-37d4415a7b433fcb987b1c6a5b51bf2d8efc5d5e.tar.gz
rails-37d4415a7b433fcb987b1c6a5b51bf2d8efc5d5e.tar.bz2
rails-37d4415a7b433fcb987b1c6a5b51bf2d8efc5d5e.zip
test for inconsistency between String and Symbol url_for handling
Diffstat (limited to 'actionview/test/activerecord/polymorphic_routes_test.rb')
-rw-r--r--actionview/test/activerecord/polymorphic_routes_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb
index b9040d5e39..a42888d873 100644
--- a/actionview/test/activerecord/polymorphic_routes_test.rb
+++ b/actionview/test/activerecord/polymorphic_routes_test.rb
@@ -81,7 +81,10 @@ class PolymorphicRoutesTest < ActionController::TestCase
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 @@ class PolymorphicRoutesTest < ActionController::TestCase
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