summaryrefslogtreecommitdiff
path: root/test/xmlrpc/test_client.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-11 15:08:59 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-11 15:08:59 +0000
commit3acd222fa5dd5f6a8aff2793ac64ebbc052ca552 (patch)
treec2807257d2e6e91cf94db0bcbe2fdb5a44c49589 /test/xmlrpc/test_client.rb
parent83c02765e1e19907ea64fe14fb2342e8422639f6 (diff)
* lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
* test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_simple): Add a test for the extracted method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/xmlrpc/test_client.rb')
-rw-r--r--test/xmlrpc/test_client.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/xmlrpc/test_client.rb b/test/xmlrpc/test_client.rb
index 3e949195d88..c888a9837f7 100644
--- a/test/xmlrpc/test_client.rb
+++ b/test/xmlrpc/test_client.rb
@@ -280,6 +280,13 @@ module XMLRPC
assert_equal 1, resp.first['blogid']
end
+ def test_cookie_simple
+ client = Fake::Client.new2('http://example.org/cookie')
+ assert_nil(client.cookie)
+ client.send(:parse_set_cookies, ["param1=value1", "param2=value2"])
+ assert_equal("param1=value1; param2=value2", client.cookie)
+ end
+
private
def read filename
File.read File.expand_path(File.join(__FILE__, '..', 'data', filename))