spec/integration/singleton_spec.rb in maestrano-connector-rails-1.2.3 vs spec/integration/singleton_spec.rb in maestrano-connector-rails-1.3.0

- old
+ new

@@ -146,11 +146,11 @@ end it 'does the mapping correctly' do idmap = Entities::SingletonIntegration.create_idmap(organization_id: organization.id, external_id: ext_comp_id, connec_id: 'some connec id') allow(Entities::SingletonIntegration).to receive(:create_idmap).and_return(idmap) - expect_any_instance_of(Entities::SingletonIntegration).to receive(:push_entities_to_external).with([{entity: {name: 'My awesome company'}, idmap: idmap}]) + expect_any_instance_of(Entities::SingletonIntegration).to receive(:push_entities_to_external).with([{entity: {name: 'My awesome company'}, idmap: idmap, id_refs_only_connec_entity: {}}]) subject end it 'send the external id to connec' do expect(connec_client).to receive(:batch).with(batch_params) @@ -205,11 +205,11 @@ expect(idmap.message).to be_nil expect(idmap.external_id).to eql(ext_comp_id) end it 'does the mapping correctly' do - expect_any_instance_of(Entities::SingletonIntegration).to receive(:push_entities_to_external).with([{entity: mapped_connec_entity, idmap: idmap}]) + expect_any_instance_of(Entities::SingletonIntegration).to receive(:push_entities_to_external).with([{entity: mapped_connec_entity, idmap: idmap, id_refs_only_connec_entity: {}}]) subject end it 'does not map the external one' do expect_any_instance_of(Entities::SingletonIntegration).to_not receive(:map_to_connec) @@ -261,10 +261,10 @@ expect(idmap.message).to be_nil expect(idmap.external_id).to eql(ext_comp_id) end it 'does the mapping correctly' do - expect_any_instance_of(Entities::SingletonIntegration).to receive(:push_entities_to_external).with([{entity: mapped_connec_entity, idmap: idmap}]) + expect_any_instance_of(Entities::SingletonIntegration).to receive(:push_entities_to_external).with([{entity: mapped_connec_entity, idmap: idmap, id_refs_only_connec_entity: {}}]) subject end end describe 'when receive only external one' do