aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-07-28 01:05:05 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-10-10 01:36:00 -0300
commit092033d59f7e2b248f6c6ab6c0b67339c5e9f2df (patch)
tree1d8437789c7180f159674f4962013e751300b4eb /actionpack/test/controller
parenteb52e5d42fbdc9288925a402dcb3c5664d1125b7 (diff)
downloadrails-092033d59f7e2b248f6c6ab6c0b67339c5e9f2df.tar.gz
rails-092033d59f7e2b248f6c6ab6c0b67339c5e9f2df.tar.bz2
rails-092033d59f7e2b248f6c6ab6c0b67339c5e9f2df.zip
Remove deprecated `ActionDispatch::IntegrationTest#*_via_redirect`.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/integration_test.rb89
1 files changed, 0 insertions, 89 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index bf5968f65a..bdda665a6b 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -31,95 +31,6 @@ class SessionTest < ActiveSupport::TestCase
end
end
- def test_request_via_redirect_uses_given_method
- path = "/somepath"; args = { id: "1" }; headers = { "X-Test-Header" => "testvalue" }
- assert_called_with @session, :process, [:put, path, params: args, headers: headers] do
- @session.stub :redirect?, false do
- assert_deprecated { @session.request_via_redirect(:put, path, params: args, headers: headers) }
- end
- end
- end
-
- def test_deprecated_request_via_redirect_uses_given_method
- path = "/somepath"; args = { id: "1" }; headers = { "X-Test-Header" => "testvalue" }
- assert_called_with @session, :process, [:put, path, params: args, headers: headers] do
- @session.stub :redirect?, false do
- assert_deprecated { @session.request_via_redirect(:put, path, args, headers) }
- end
- end
- end
-
- def test_request_via_redirect_follows_redirects
- path = "/somepath"; args = { id: "1" }; headers = { "X-Test-Header" => "testvalue" }
- value_series = [true, true, false]
- assert_called @session, :follow_redirect!, times: 2 do
- @session.stub :redirect?, -> { value_series.shift } do
- assert_deprecated { @session.request_via_redirect(:get, path, params: args, headers: headers) }
- end
- end
- end
-
- def test_request_via_redirect_returns_status
- path = "/somepath"; args = { id: "1" }; headers = { "X-Test-Header" => "testvalue" }
- @session.stub :redirect?, false do
- @session.stub :status, 200 do
- assert_deprecated do
- assert_equal 200, @session.request_via_redirect(:get, path, params: args, headers: headers)
- end
- end
- end
- end
-
- def test_deprecated_get_via_redirect
- path = "/somepath"; args = { id: "1" }; headers = { "X-Test-Header" => "testvalue" }
-
- assert_called_with @session, :request_via_redirect, [:get, path, args, headers] do
- assert_deprecated do
- @session.get_via_redirect(path, args, headers)
- end
- end
- end
-
- def test_deprecated_post_via_redirect
- path = "/somepath"; args = { id: "1" }; headers = { "X-Test-Header" => "testvalue" }
-
- assert_called_with @session, :request_via_redirect, [:post, path, args, headers] do
- assert_deprecated do
- @session.post_via_redirect(path, args, headers)
- end
- end
- end
-
- def test_deprecated_patch_via_redirect
- path = "/somepath"; args = { id: "1" }; headers = { "X-Test-Header" => "testvalue" }
-
- assert_called_with @session, :request_via_redirect, [:patch, path, args, headers] do
- assert_deprecated do
- @session.patch_via_redirect(path, args, headers)
- end
- end
- end
-
- def test_deprecated_put_via_redirect
- path = "/somepath"; args = { id: "1" }; headers = { "X-Test-Header" => "testvalue" }
-
- assert_called_with @session, :request_via_redirect, [:put, path, args, headers] do
- assert_deprecated do
- @session.put_via_redirect(path, args, headers)
- end
- end
- end
-
- def test_deprecated_delete_via_redirect
- path = "/somepath"; args = { id: "1" }; headers = { "X-Test-Header" => "testvalue" }
-
- assert_called_with @session, :request_via_redirect, [:delete, path, args, headers] do
- assert_deprecated do
- @session.delete_via_redirect(path, args, headers)
- end
- end
- end
-
def test_get
path = "/index"; params = "blah"; headers = { location: "blah" }