Sha256: 1f596b158076bd05378e2216bb62e0196574f1685f07c86f5c63d007c2804b16
Contents?: true
Size: 960 Bytes
Versions: 56
Compression:
Stored size: 960 Bytes
Contents
require 'spec_helper' describe NetSuite::Actions::Delete do before(:all) { savon.mock! } after(:all) { savon.unmock! } context 'Customer' do let(:customer) do NetSuite::Records::Customer.new(:internal_id => '980', :entity_id => 'Shutter Fly', :company_name => 'Shutter Fly, Inc.') end before do savon.expects(:delete).with(:message => { 'platformMsgs:baseRef' => { '@internalId' => '980', '@type' => 'customer', '@xsi:type' => 'platformCore:RecordRef' }, }).returns(File.read('spec/support/fixtures/delete/delete_customer.xml')) end it 'makes a valid request to the NetSuite API' do NetSuite::Actions::Delete.call([customer]) end it 'returns a valid Response object' do response = NetSuite::Actions::Delete.call([customer]) expect(response).to be_kind_of(NetSuite::Response) expect(response).to be_success end end end
Version data entries
56 entries across 56 versions & 1 rubygems