aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/cookies_test.rb
diff options
context:
space:
mode:
authorMarcin Olichwirowicz <olichwirowicz@gmail.com>2015-08-21 22:33:50 +0200
committerMarcin Olichwirowicz <olichwirowicz@gmail.com>2015-08-24 12:24:07 +0200
commit3a161e65e76a83be6d62c424227fe10b5b66b77d (patch)
tree0c16ac99bd0b4f9735e0dc9e85778af255819e13 /actionpack/test/dispatch/cookies_test.rb
parent90bcb6dea7f8fc8b93b4266180465fc0c0785c01 (diff)
downloadrails-3a161e65e76a83be6d62c424227fe10b5b66b77d.tar.gz
rails-3a161e65e76a83be6d62c424227fe10b5b66b77d.tar.bz2
rails-3a161e65e76a83be6d62c424227fe10b5b66b77d.zip
Get rid of mocha tests - part 1
Diffstat (limited to 'actionpack/test/dispatch/cookies_test.rb')
-rw-r--r--actionpack/test/dispatch/cookies_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/cookies_test.rb b/actionpack/test/dispatch/cookies_test.rb
index aca28ae8d1..3454e60697 100644
--- a/actionpack/test/dispatch/cookies_test.rb
+++ b/actionpack/test/dispatch/cookies_test.rb
@@ -321,10 +321,12 @@ class CookiesTest < ActionController::TestCase
end
def test_setting_cookie_with_secure_when_always_write_cookie_is_true
- ActionDispatch::Cookies::CookieJar.any_instance.stubs(:always_write_cookie).returns(true)
+ old_cookie, @request.cookie_jar.always_write_cookie = @request.cookie_jar.always_write_cookie, true
get :authenticate_with_secure
assert_cookie_header "user_name=david; path=/; secure"
assert_equal({"user_name" => "david"}, @response.cookies)
+ ensure
+ @request.cookie_jar.always_write_cookie = old_cookie
end
def test_not_setting_cookie_with_secure