summaryrefslogtreecommitdiff
path: root/test/xmlrpc/test_client.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-13 13:46:54 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-13 13:46:54 +0000
commit16d5c80678042e7d9f42c022ba7b1816f15611ad (patch)
tree7896423107851461459a54b2e6fdc4a8b8b9c719 /test/xmlrpc/test_client.rb
parent102e2cd5633b3e7f685a2dc6d3339d4598638585 (diff)
* lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Support
multiple names in a response. [ruby-core:41711] [Bug #5774] Reported by Roman Riha. Thanks!!! * test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_override): Add a test of the above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/xmlrpc/test_client.rb')
-rw-r--r--test/xmlrpc/test_client.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/xmlrpc/test_client.rb b/test/xmlrpc/test_client.rb
index c888a9837f7..35559d23c48 100644
--- a/test/xmlrpc/test_client.rb
+++ b/test/xmlrpc/test_client.rb
@@ -287,6 +287,17 @@ module XMLRPC
assert_equal("param1=value1; param2=value2", client.cookie)
end
+ def test_cookie_override
+ client = Fake::Client.new2('http://example.org/cookie')
+ client.send(:parse_set_cookies,
+ [
+ "param1=value1",
+ "param2=value2",
+ "param1=value3",
+ ])
+ assert_equal("param2=value2; param1=value3", client.cookie)
+ end
+
private
def read filename
File.read File.expand_path(File.join(__FILE__, '..', 'data', filename))