summaryrefslogtreecommitdiff
path: root/test/open-uri
diff options
context:
space:
mode:
Diffstat (limited to 'test/open-uri')
-rw-r--r--test/open-uri/test_open-uri.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/open-uri/test_open-uri.rb b/test/open-uri/test_open-uri.rb
index 740728e9e7..21dd96960a 100644
--- a/test/open-uri/test_open-uri.rb
+++ b/test/open-uri/test_open-uri.rb
@@ -502,6 +502,21 @@ class TestOpenURI < Test::Unit::TestCase
}
end if defined?(Zlib::GzipWriter)
+ def test_multiple_cookies
+ with_http {|srv, dr, url|
+ srv.mount_proc("/mcookie/") {|req, res|
+ res.cookies << "name1=value1; blabla"
+ res.cookies << "name2=value2; blabla"
+ res.body = "foo"
+ }
+ open("#{url}/mcookie/") {|f|
+ assert_equal("foo", f.read)
+ assert_equal(["name1=value1; blabla", "name2=value2; blabla"],
+ f.metas['set-cookie'].sort)
+ }
+ }
+ end
+
# 192.0.2.0/24 is TEST-NET. [RFC3330]
def test_ftp_invalid_request