diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-06 18:10:44 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-06 18:10:44 -0700 |
commit | af864447f182e20bebebdb151201343e7d6c4904 (patch) | |
tree | c909c5b36b0e4813f843dca27ef966ddf9119c6d | |
parent | 57e5098032fcd7d5d79cab711ce8b1461f026ea0 (diff) | |
download | rails-af864447f182e20bebebdb151201343e7d6c4904.tar.gz rails-af864447f182e20bebebdb151201343e7d6c4904.tar.bz2 rails-af864447f182e20bebebdb151201343e7d6c4904.zip |
apparently passing a string to polymorphic_url is something we support
o_O
-rw-r--r-- | actionview/test/activerecord/polymorphic_routes_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb index eee4d7accc..76899c7aff 100644 --- a/actionview/test/activerecord/polymorphic_routes_test.rb +++ b/actionview/test/activerecord/polymorphic_routes_test.rb @@ -79,6 +79,18 @@ class PolymorphicRoutesTest < ActionController::TestCase assert_equal url, url_for(args) end + def test_string + with_test_routes do + assert_equal "http://example.com/projects", polymorphic_url("projects") + end + end + + def test_string_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) |