Skip to content

Commit

Permalink
Add test for add_http_options method
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangtuanictvn committed Jan 3, 2021
1 parent aeecc0a commit 40ff85e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test_ruby_http_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@ def add_ssl
assert_equal(http.verify_mode, OpenSSL::SSL::VERIFY_PEER)
end

def add_http_options
uri = URI.parse('https://localhost:4010')
http = Net::HTTP.new(uri.host, uri.port)
http = @client_with_options.add_http_options(http)
assert_equal(http.read_timeout, 60)
assert_equal(http.write_timeout, 60)
end

def test__
url1 = @client._('test')
assert_equal(['test'], url1.url_path)
Expand Down

0 comments on commit 40ff85e

Please sign in to comment.