diff --git a/ChangeLog b/ChangeLog index a2f5fd6c12..3cddcfea7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Jun 12 00:07:46 2013 Kouhei Sutou + + * 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. + Tue Jun 11 23:56:24 2013 Kouhei Sutou * test/xmlrpc/test_client.rb (XMLRPC::ClientTest::Fake::HTTP#started): diff --git a/test/xmlrpc/test_client.rb b/test/xmlrpc/test_client.rb index 3e949195d8..c888a9837f 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))