Sha256: 159fb3de221ed96e96db3f912cd9fad60e3be4b1c9b0e7db68c85bfd10dbdce9
Contents?: true
Size: 1023 Bytes
Versions: 6
Compression:
Stored size: 1023 Bytes
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) response.should be_kind_of(NetSuite::Response) response.should be_success end end
Version data entries
6 entries across 6 versions & 1 rubygems