aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-28 18:34:39 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-28 18:34:39 -0200
commit643f08beebf27439e93a565b2c4c46afaf7fa626 (patch)
treeefbeb0e7b4895b92b2b607e4b4738617e8cbc4cf /actionpack/test/controller
parent69acffa30ed8f44261c7dfce7ed6d0d3570a2b7a (diff)
parent751f752b43873311f2fa929934a53fd4b81317f9 (diff)
downloadrails-643f08beebf27439e93a565b2c4c46afaf7fa626.tar.gz
rails-643f08beebf27439e93a565b2c4c46afaf7fa626.tar.bz2
rails-643f08beebf27439e93a565b2c4c46afaf7fa626.zip
Merge pull request #18693 from aditya-kapoor/deprecate_via_redirect
Deprecate *_via_redirect integration test methods
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/integration_test.rb40
1 files changed, 25 insertions, 15 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 5c0651bd73..2c04d78215 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -52,33 +52,43 @@ class SessionTest < ActiveSupport::TestCase
end
def test_get_via_redirect
- path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
- @session.expects(:request_via_redirect).with(:get, path, args, headers)
- @session.get_via_redirect(path, args, headers)
+ assert_deprecated do
+ path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
+ @session.expects(:request_via_redirect).with(:get, path, args, headers)
+ @session.get_via_redirect(path, args, headers)
+ end
end
def test_post_via_redirect
- path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
- @session.expects(:request_via_redirect).with(:post, path, args, headers)
- @session.post_via_redirect(path, args, headers)
+ assert_deprecated do
+ path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
+ @session.expects(:request_via_redirect).with(:post, path, args, headers)
+ @session.post_via_redirect(path, args, headers)
+ end
end
def test_patch_via_redirect
- path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
- @session.expects(:request_via_redirect).with(:patch, path, args, headers)
- @session.patch_via_redirect(path, args, headers)
+ assert_deprecated do
+ path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
+ @session.expects(:request_via_redirect).with(:patch, path, args, headers)
+ @session.patch_via_redirect(path, args, headers)
+ end
end
def test_put_via_redirect
- path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
- @session.expects(:request_via_redirect).with(:put, path, args, headers)
- @session.put_via_redirect(path, args, headers)
+ assert_deprecated do
+ path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
+ @session.expects(:request_via_redirect).with(:put, path, args, headers)
+ @session.put_via_redirect(path, args, headers)
+ end
end
def test_delete_via_redirect
- path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
- @session.expects(:request_via_redirect).with(:delete, path, args, headers)
- @session.delete_via_redirect(path, args, headers)
+ assert_deprecated do
+ path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
+ @session.expects(:request_via_redirect).with(:delete, path, args, headers)
+ @session.delete_via_redirect(path, args, headers)
+ end
end
def test_get