aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-07 09:55:57 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-05-07 09:55:57 -0700
commitbfcbd6fd4cf5f60d8de3824355e0348b0fc91637 (patch)
tree0f40e61ed2388104df70f4e4906179493a1ad20d /actionview/test
parent98baa827ac5e3a7e0fd427febed066d013198371 (diff)
downloadrails-bfcbd6fd4cf5f60d8de3824355e0348b0fc91637.tar.gz
rails-bfcbd6fd4cf5f60d8de3824355e0348b0fc91637.tar.bz2
rails-bfcbd6fd4cf5f60d8de3824355e0348b0fc91637.zip
add tests for symbols passed to polymorphic_url
Diffstat (limited to 'actionview/test')
-rw-r--r--actionview/test/activerecord/polymorphic_routes_test.rb12
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 76899c7aff..b9040d5e39 100644
--- a/actionview/test/activerecord/polymorphic_routes_test.rb
+++ b/actionview/test/activerecord/polymorphic_routes_test.rb
@@ -91,6 +91,18 @@ class PolymorphicRoutesTest < ActionController::TestCase
end
end
+ def test_symbol
+ with_test_routes do
+ assert_equal "http://example.com/projects", polymorphic_url(:projects)
+ end
+ end
+
+ def test_symbol_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)