diff options
author | Arthur Neves <arthurnn@gmail.com> | 2014-05-13 00:03:38 -0400 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2014-05-13 00:03:38 -0400 |
commit | 7ec665303d125c945f7d59affb904f974143a087 (patch) | |
tree | f6da6ea098f525acda810c441ecc5a4e601d5200 /actionpack/test | |
parent | 84908bbde97ef70b09aca4937793052422bc06ed (diff) | |
download | rails-7ec665303d125c945f7d59affb904f974143a087.tar.gz rails-7ec665303d125c945f7d59affb904f974143a087.tar.bz2 rails-7ec665303d125c945f7d59affb904f974143a087.zip |
Fix regression on `assert_redirected_to`.
`assert_redirected_to` would fail if there is no controller set on
a `ActionDispatch::IntegrationTest`, as _compute_redirect_to_location
would be called on the controller to build the url.
This regression was introduced after 1dacfbabf3bb1e0a9057dd2a016b1804e7fa38c0.
[fixes #14691]
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/integration_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index e851cc6a63..200a2dcc47 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -374,6 +374,10 @@ class IntegrationProcessTest < ActionDispatch::IntegrationTest follow_redirect! assert_response :success assert_equal "/get", path + + get '/moved' + assert_response :redirect + assert_redirected_to '/method' end end @@ -511,6 +515,8 @@ class IntegrationProcessTest < ActionDispatch::IntegrationTest end set.draw do + get 'moved' => redirect('/method') + match ':action', :to => controller, :via => [:get, :post], :as => :action get 'get/:action', :to => controller, :as => :get_action end |