aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-11-23 12:58:56 -0800
committerJosé Valim <jose.valim@gmail.com>2011-11-23 12:58:56 -0800
commite6cfd853613f9d9e0232512146e40db4ee232a3c (patch)
tree824319d4261f200ff499e6900bc68841ec41c9a5 /actionpack/test
parent40b19e063592fc30705f17aafe6a458e7b622ff2 (diff)
parent98a1717e7c094d011c89ea1ed88673a595af2de8 (diff)
downloadrails-e6cfd853613f9d9e0232512146e40db4ee232a3c.tar.gz
rails-e6cfd853613f9d9e0232512146e40db4ee232a3c.tar.bz2
rails-e6cfd853613f9d9e0232512146e40db4ee232a3c.zip
Merge pull request #3739 from lest/config-always-write-cookie
configuration option to always write cookie
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/cookies_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/cookies_test.rb b/actionpack/test/dispatch/cookies_test.rb
index 49da448001..3765b7eb44 100644
--- a/actionpack/test/dispatch/cookies_test.rb
+++ b/actionpack/test/dispatch/cookies_test.rb
@@ -210,8 +210,8 @@ class CookiesTest < ActionController::TestCase
assert_equal({"user_name" => "david"}, @response.cookies)
end
- def test_setting_cookie_with_secure_in_development
- Rails.env.stubs(:development?).returns(true)
+ def test_setting_cookie_with_secure_when_always_write_cookie_is_true
+ ActionDispatch::Cookies::CookieJar.any_instance.stubs(:always_write_cookie).returns(true)
get :authenticate_with_secure
assert_cookie_header "user_name=david; path=/; secure"
assert_equal({"user_name" => "david"}, @response.cookies)