spec/unit/intercom/contact_spec.rb in intercom-3.0.4 vs spec/unit/intercom/contact_spec.rb in intercom-3.0.5
- old
+ new
@@ -13,9 +13,15 @@
it 'should not throw ArgumentErrors when there are no parameters' do
client.expects(:post)
client.contacts.create
end
+ it 'can update a contact with an id' do
+ contact = Intercom::Contact.new(:id => "de45ae78gae1289cb")
+ client.expects(:put).with("/contacts/de45ae78gae1289cb", {'custom_attributes' => {}})
+ client.contacts.save(contact)
+ end
+
describe 'converting' do
let(:contact) { Intercom::Contact.from_api(user_id: 'contact_id') }
let(:user) { Intercom::User.from_api(id: 'user_id') }
it do