Skip to content

Commit 989c0e9

Browse files
Refactor test for http_options
1 parent 6757832 commit 989c0e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/sendgrid/test_sendgrid-ruby.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ def test_init_when_impersonate_subuser_is_not_given
4444
end
4545

4646
def test_init_when_http_options_is_given
47-
headers = JSON.parse('{"X-Mock": 200}')
4847
http_options = {
4948
open_timeout: 40,
5049
read_timeout: 40
5150
}
5251

53-
sg = SendGrid::API.new(api_key: 'SENDGRID_API_KEY', host: 'https://api.test.com', request_headers: headers, version: 'v3', http_options: http_options)
54-
sg.client.get
52+
sg = SendGrid::API.new(api_key: 'SENDGRID_API_KEY', version: 'v3', http_options: http_options)
53+
client = sg.client.ips
54+
response = client.get(query_params: params, request_headers: headers)
5555

56-
assert_equal(40, sg.client.http.open_timeout)
57-
assert_equal(40, sg.client.http.read_timeout)
56+
assert_equal(40, client.http.open_timeout)
57+
assert_equal(40, client.http.read_timeout)
5858
end
5959

6060
def test_access_settings_activity_get

0 commit comments

Comments
 (0)