From bfcbd6fd4cf5f60d8de3824355e0348b0fc91637 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 7 May 2014 09:55:57 -0700 Subject: add tests for symbols passed to polymorphic_url --- actionview/test/activerecord/polymorphic_routes_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) -- cgit v1.2.3