aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/cookies_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-06-30 08:01:26 -0300
committerJosé Valim <jose.valim@gmail.com>2011-06-30 08:01:53 -0300
commitf34f0b7e0832a1910ab9c71080e024c8e36504b2 (patch)
treed2f8a5f6c51ae09cda6d45624606c868960f11bf /actionpack/test/dispatch/cookies_test.rb
parentd1b61883162278e334e2892d193b31395bb47032 (diff)
downloadrails-f34f0b7e0832a1910ab9c71080e024c8e36504b2.tar.gz
rails-f34f0b7e0832a1910ab9c71080e024c8e36504b2.tar.bz2
rails-f34f0b7e0832a1910ab9c71080e024c8e36504b2.zip
Add has_key? and key? methods to CookieJar removed in 0ca69ca65f83b4bb34f8
Diffstat (limited to 'actionpack/test/dispatch/cookies_test.rb')
-rw-r--r--actionpack/test/dispatch/cookies_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/cookies_test.rb b/actionpack/test/dispatch/cookies_test.rb
index 8e5fd97cc6..fb67ecb07d 100644
--- a/actionpack/test/dispatch/cookies_test.rb
+++ b/actionpack/test/dispatch/cookies_test.rb
@@ -148,6 +148,15 @@ class CookiesTest < ActionController::TestCase
@request.host = "www.nextangle.com"
end
+ def test_key_methods
+ assert !request.cookie_jar.key?(:foo)
+ assert !request.cookie_jar.has_key?("foo")
+
+ request.cookie_jar[:foo] = :bar
+ assert request.cookie_jar.key?(:foo)
+ assert request.cookie_jar.has_key?("foo")
+ end
+
def test_setting_cookie
get :authenticate
assert_cookie_header "user_name=david; path=/"