Skip to content

Commit b3281ae

Browse files
authored
Merge pull request #499 from intercom/jonny/fix-privatised-method-name
Fix private method error and add test
2 parents 8966ce6 + 8fec48f commit b3281ae

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

lib/intercom/request.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ def execute(target_base_url=nil, username:, secret: nil, read_timeout: 90, open_
9393
:rate_limit_details
9494

9595
private :path,
96-
:net_http_method,
97-
:rate_limit_details
96+
:net_http_method
9897

9998
private def client(uri, read_timeout:, open_timeout:)
10099
net = Net::HTTP.new(uri.host, uri.port)

spec/unit/intercom/client_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ module Intercom
7373
it 'raises on empty api version' do
7474
proc { Client.new(app_id: app_id, api_key: api_key, api_version: '') }.must_raise MisconfiguredClientError
7575
end
76+
77+
it "assigns works" do
78+
stub_request(:any, "https://api.intercom.io/users?id=123").to_return(
79+
status: [200, "OK"],
80+
headers: { 'X-RateLimit-Reset' => Time.now.utc + 10 },
81+
body: { "test": "testing" }.to_json
82+
)
83+
84+
client.get("/users", { id: "123" })
85+
end
7686
end
7787

7888
describe 'OAuth clients' do

0 commit comments

Comments
 (0)