aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index b96987410f..50b959cc39 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -694,6 +694,21 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
def test_redirect_proc
with_test_routes do
get '/account/proc/person'
+
+ verify_redirect 'http://www.example.com/people'
+ end
+ end
+
+ def test_redirect_deprecated_proc
+ assert_deprecated do
+ self.class.stub_controllers do |routes|
+ routes.draw { match 'account/deprecated_proc/:name', :to => redirect {|params| "/#{params[:name].pluralize}" } }
+ end
+ end
+
+ with_test_routes do
+ get '/account/proc/person'
+
verify_redirect 'http://www.example.com/people'
end
end