aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/cookie_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-07-01 23:27:59 +0000
committerMichael Koziarski <michael@koziarski.com>2007-07-01 23:27:59 +0000
commitfd65d89e07d57d809c69043b52a3a1319fb3c2ad (patch)
treef52846c64adfd426594fcd0572284d3fc26408b9 /actionpack/test/controller/cookie_test.rb
parenta450e769f1c7f5c68799f570856d020863528d17 (diff)
downloadrails-fd65d89e07d57d809c69043b52a3a1319fb3c2ad.tar.gz
rails-fd65d89e07d57d809c69043b52a3a1319fb3c2ad.tar.bz2
rails-fd65d89e07d57d809c69043b52a3a1319fb3c2ad.zip
Allow you to delete cookies with options. Closes #3685 [josh, Chris Wanstrath]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7160 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/cookie_test.rb')
-rw-r--r--actionpack/test/controller/cookie_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/cookie_test.rb b/actionpack/test/controller/cookie_test.rb
index 5bab99fdca..44023b0791 100644
--- a/actionpack/test/controller/cookie_test.rb
+++ b/actionpack/test/controller/cookie_test.rb
@@ -31,6 +31,11 @@ class CookieTest < Test::Unit::TestCase
cookies.delete("user_name")
end
+ def delete_cookie_with_path
+ cookies.delete("user_name", :path => '/beaten')
+ render_text "hello world"
+ end
+
def rescue_action(e)
raise unless ActionController::MissingTemplate # No templates here, and we don't care about the output
end
@@ -85,4 +90,10 @@ class CookieTest < Test::Unit::TestCase
assert_equal "david", jar["user_name"]
assert_equal nil, jar["something_else"]
end
+
+ def test_delete_cookie_with_path
+ get :delete_cookie_with_path
+ assert_equal "/beaten", @response.headers["cookie"].first.path
+ assert_not_equal "/", @response.headers["cookie"].first.path
+ end
end