diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-05-10 04:59:29 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-09 23:57:49 -0300 |
commit | 333bfd896e87862cece95deb1ef88132d5f54ba8 (patch) | |
tree | 6287abb4b755baf6cabc39922f8e4f531e90f1d8 /actionpack/test/controller | |
parent | a2762d95c6f2c1cf6ba96002ffb5ebea7c3eac61 (diff) | |
download | rails-333bfd896e87862cece95deb1ef88132d5f54ba8.tar.gz rails-333bfd896e87862cece95deb1ef88132d5f54ba8.tar.bz2 rails-333bfd896e87862cece95deb1ef88132d5f54ba8.zip |
Remove deprecated support to `:back` in `redirect_to`
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/redirect_test.rb | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb index 495e41ce76..0e61b92bcf 100644 --- a/actionpack/test/controller/redirect_test.rb +++ b/actionpack/test/controller/redirect_test.rb @@ -56,10 +56,6 @@ class RedirectController < ActionController::Base redirect_to("/things/stuff", status: 301) end - def redirect_to_back_with_status - redirect_to :back, status: 307 - end - def redirect_back_with_status redirect_back(fallback_location: "/things/stuff", status: 307) end @@ -88,10 +84,6 @@ class RedirectController < ActionController::Base redirect_to "//www.rubyonrails.org/" end - def redirect_to_back - redirect_to :back - end - def redirect_to_existing_record redirect_to Workshop.new(5) end @@ -206,17 +198,6 @@ class RedirectTest < ActionController::TestCase assert_equal "http://test.host/things/stuff", redirect_to_url end - def test_redirect_to_back_with_status - @request.env["HTTP_REFERER"] = "http://www.example.com/coming/from" - - assert_deprecated do - get :redirect_to_back_with_status - end - - assert_response 307 - assert_equal "http://www.example.com/coming/from", redirect_to_url - end - def test_simple_redirect_using_options get :host_redirect assert_response :redirect @@ -259,29 +240,6 @@ class RedirectTest < ActionController::TestCase assert_equal "//www.rubyonrails.org/", redirect_to_url end - def test_redirect_to_back - @request.env["HTTP_REFERER"] = "http://www.example.com/coming/from" - - assert_deprecated do - get :redirect_to_back - end - - assert_response :redirect - assert_equal "http://www.example.com/coming/from", redirect_to_url - end - - def test_redirect_to_back_with_no_referer - assert_raise(ActionController::RedirectBackError) { - @request.env["HTTP_REFERER"] = nil - - assert_deprecated do - get :redirect_to_back - end - - get :redirect_to_back - } - end - def test_redirect_back referer = "http://www.example.com/coming/from" @request.env["HTTP_REFERER"] = referer |