1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Silence Net::HTTP warning in test.

https://github.com/ruby/webrick/pull/8

  Co-authored-by: Espartaco Palma <>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2018-08-07 13:08:53 +00:00
parent 68fac148f8
commit dfd6787f46

View file

@ -64,6 +64,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase
req = Net::HTTP::Post.new("/")
req.body = "post-data"
req.content_type = "application/x-www-form-urlencoded"
http.request(req){|res|
assert_equal("1.1 localhost.localdomain:#{port}", res["via"], log.call)
assert_equal("POST / post-data", res.body, log.call)
@ -108,6 +109,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase
assert_equal(2, request_handler_called, log.call)
req = Net::HTTP::Post.new("/")
req.content_type = "application/x-www-form-urlencoded"
req.body = "post-data"
http.request(req){|res|
assert_nil(res["via"], log.call)
@ -336,6 +338,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase
req = Net::HTTP::Post.new("/")
req.body = "post-data"
req.content_type = "application/x-www-form-urlencoded"
http.request(req){|res|
via = res["via"].split(/,\s+/)
assert(via.include?("1.1 localhost.localdomain:#{up_port}"), up_log.call + log.call)
@ -380,6 +383,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase
req2 = Net::HTTP::Post.new("/")
req2.body = "post-data"
req2.content_type = "application/x-www-form-urlencoded"
http.request(req2){|res|
assert_equal("SSL POST / post-data", res.body, up_log.call + log.call + s_log.call)
}