Skip to content

Commit 20e8e38

Browse files
committed
Merge pull request #172 from intercom/jo/add-contact-api-update-spec
add spec for contact update with id
2 parents a5dcf9b + 0957def commit 20e8e38

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/unit/intercom/contact_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
client.contacts.create
1616
end
1717

18+
it 'can update a contact with an id' do
19+
contact = Intercom::Contact.new(:id => "de45ae78gae1289cb")
20+
client.expects(:put).with("/contacts/de45ae78gae1289cb", {'custom_attributes' => {}})
21+
client.contacts.save(contact)
22+
end
23+
1824
describe 'converting' do
1925
let(:contact) { Intercom::Contact.from_api(user_id: 'contact_id') }
2026
let(:user) { Intercom::User.from_api(id: 'user_id') }

0 commit comments

Comments
 (0)