mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
83c02765e1
commit
3acd222fa5
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Jun 12 00:07:46 2013 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
|
* 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 <kou@cozmixng.org>
|
Tue Jun 11 23:56:24 2013 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
* test/xmlrpc/test_client.rb (XMLRPC::ClientTest::Fake::HTTP#started):
|
* test/xmlrpc/test_client.rb (XMLRPC::ClientTest::Fake::HTTP#started):
|
||||||
|
|
|
@ -280,6 +280,13 @@ module XMLRPC
|
||||||
assert_equal 1, resp.first['blogid']
|
assert_equal 1, resp.first['blogid']
|
||||||
end
|
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
|
private
|
||||||
def read filename
|
def read filename
|
||||||
File.read File.expand_path(File.join(__FILE__, '..', 'data', filename))
|
File.read File.expand_path(File.join(__FILE__, '..', 'data', filename))
|
||||||
|
|
Loading…
Reference in a new issue