Sha256: 37c3e5c3af91a80e373d2302edce48079e490a9e046cecd7a04678299ff53299
Contents?: true
Size: 694 Bytes
Versions: 4
Compression:
Stored size: 694 Bytes
Contents
require "spec_helper" describe "Intercom::Contact" do let (:client) { Intercom::Client.new(app_id: 'app_id', api_key: 'api_key') } it 'should not throw ArgumentErrors when there are no parameters' do client.expects(:post) client.contacts.create 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 client.expects(:post).with( "/contacts/convert", { contact: { user_id: contact.user_id }, user: { 'id' => user.id } } ).returns(test_user) client.contacts.convert(contact, user) end end end
Version data entries
4 entries across 4 versions & 1 rubygems