diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-03-31 12:49:57 -0300 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-03-31 17:59:21 +0200 |
commit | 27fc6ec95eb7a1756fb86693b6fe8e03f1d66ef3 (patch) | |
tree | ff5967d5ea35dabc9f1fb34a876cc52356e133d7 /actionpack/test | |
parent | 9894d1665380d36a05f6444ed6fd15be85daf880 (diff) | |
download | rails-27fc6ec95eb7a1756fb86693b6fe8e03f1d66ef3.tar.gz rails-27fc6ec95eb7a1756fb86693b6fe8e03f1d66ef3.tar.bz2 rails-27fc6ec95eb7a1756fb86693b6fe8e03f1d66ef3.zip |
Fix the redirect when it receive blocks with arity of 1.
Closes #5677
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 15 |
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 |