aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/cookies_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-11 12:57:43 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-11 12:57:43 -0700
commit20f18cbc148270112c670189cf5489900a2271dc (patch)
tree964d287bdd3a089ee6ab41f0f5c1ce44d0ae8f22 /actionpack/test/dispatch/cookies_test.rb
parentdad717a5ea525743255b7cc17c28ca087054967a (diff)
parent2e04a343eb668fe73864156ed9f3c373d42a588c (diff)
downloadrails-20f18cbc148270112c670189cf5489900a2271dc.tar.gz
rails-20f18cbc148270112c670189cf5489900a2271dc.tar.bz2
rails-20f18cbc148270112c670189cf5489900a2271dc.zip
Merge pull request #7316 from brainopia/backport_fix_session_store_options
Backport of "Support cookie jar options for all cookie stores" for 3.2-stable
Diffstat (limited to 'actionpack/test/dispatch/cookies_test.rb')
-rw-r--r--actionpack/test/dispatch/cookies_test.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/cookies_test.rb b/actionpack/test/dispatch/cookies_test.rb
index 6ebd02e85c..2b043db030 100644
--- a/actionpack/test/dispatch/cookies_test.rb
+++ b/actionpack/test/dispatch/cookies_test.rb
@@ -179,6 +179,18 @@ class CookiesTest < ActionController::TestCase
assert_equal({"user_name" => "david"}, @response.cookies)
end
+ def test_setting_the_same_value_to_cookie
+ request.cookies[:user_name] = 'david'
+ get :authenticate
+ assert response.cookies.empty?
+ end
+
+ def test_setting_the_same_value_to_permanent_cookie
+ request.cookies[:user_name] = 'Jamie'
+ get :set_permanent_cookie
+ assert_equal response.cookies, 'user_name' => 'Jamie'
+ end
+
def test_setting_with_escapable_characters
get :set_with_with_escapable_characters
assert_cookie_header "that+%26+guy=foo+%26+bar+%3D%3E+baz; path=/"
@@ -564,4 +576,4 @@ class CookiesTest < ActionController::TestCase
assert_not_equal expected.split("\n"), header
end
end
-end \ No newline at end of file
+end