aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2017-02-20 00:07:58 +0200
committerbogdanvlviv <bogdanvlviv@gmail.com>2017-02-20 01:27:32 +0200
commitf1a097733a6923d4c7b6b4413394ce86e17198d6 (patch)
tree8f16051edaad48b0ed8723567c7b5a1febeab2f1
parent4f2aa162ed3dc419fa1a7880ecd77d47ba28a8d3 (diff)
downloadrails-f1a097733a6923d4c7b6b4413394ce86e17198d6.tar.gz
rails-f1a097733a6923d4c7b6b4413394ce86e17198d6.tar.bz2
rails-f1a097733a6923d4c7b6b4413394ce86e17198d6.zip
Add assertion to polymorphic_routes_test.rb
The assertion will ensure that the behavior doesn't regress. assert_equal "/projects", polymorphic_path("projects") Remove FIXME related to polymorphic_url behavior. polymorphic_url with Symbol or String works equally. Example: default_url_options[:host] = "example.com" polymorphic_url(:projects) # => "http://example.com/projects" polymorphic_url("projects") # => "http://example.com/projects" Related to 37d4415a7b433fcb987b1c6a5b51bf2d8efc5d5e
-rw-r--r--actionview/test/activerecord/polymorphic_routes_test.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb
index dcad0b424c..e99c769dc2 100644
--- a/actionview/test/activerecord/polymorphic_routes_test.rb
+++ b/actionview/test/activerecord/polymorphic_routes_test.rb
@@ -86,8 +86,7 @@ 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 "/projects", polymorphic_path("projects")
assert_equal "http://example.com/projects", polymorphic_url("projects")
assert_equal "projects", url_for("projects")
end