Sha256: 131bef6b3adb4da3839615af21d9428ae90c52af1b67babd46a6eeac01af7590
Contents?: true
Size: 1.01 KB
Versions: 60
Compression:
Stored size: 1.01 KB
Contents
require 'spec_helper' describe NetSuite::Actions::Initialize do before(:all) { savon.mock! } after(:all) { savon.unmock! } let(:customer) { NetSuite::Records::Customer.new(:internal_id => 1) } before do savon.expects(:initialize).with(:message => { 'platformMsgs:initializeRecord' => { 'platformCore:type' => 'customer', 'platformCore:reference' => {}, :attributes! => { 'platformCore:reference' => { 'internalId' => 1, :type => 'customer' } } } }).returns(File.read('spec/support/fixtures/initialize/initialize_invoice_from_customer.xml')) end it 'makes a valid request to the NetSuite API' do NetSuite::Actions::Initialize.call([NetSuite::Records::Customer, customer]) end it 'returns a valid Response object' do response = NetSuite::Actions::Initialize.call([NetSuite::Records::Customer, customer]) expect(response).to be_kind_of(NetSuite::Response) expect(response).to be_success end end
Version data entries
60 entries across 60 versions & 1 rubygems