Skip to content

Commit b9b19b1

Browse files
Add test for add_http_options method
1 parent aeecc0a commit b9b19b1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/test_ruby_http_client.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,14 @@ def add_ssl
253253
assert_equal(http.verify_mode, OpenSSL::SSL::VERIFY_PEER)
254254
end
255255

256+
def test_add_http_options
257+
uri = URI.parse('https://localhost:4010')
258+
http = Net::HTTP.new(uri.host, uri.port)
259+
http = @client_with_options.add_http_options(http)
260+
assert_equal(http.read_timeout, 60)
261+
assert_equal(http.write_timeout, 60)
262+
end
263+
256264
def test__
257265
url1 = @client._('test')
258266
assert_equal(['test'], url1.url_path)

0 commit comments

Comments
 (0)