aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/redirect_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/redirect_test.rb')
-rw-r--r--actionpack/test/controller/redirect_test.rb44
1 files changed, 1 insertions, 43 deletions
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb
index 495e41ce76..e4e968dfdb 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
@@ -131,7 +123,7 @@ class RedirectController < ActionController::Base
def rescue_errors(e) raise e end
- protected
+ private
def dashbord_url(id, message)
url_for action: "dashboard", params: { "id" => id, "message" => message }
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