spec/netsuite/actions/upsert_spec.rb in netsuite-0.2.4 vs spec/netsuite/actions/upsert_spec.rb in netsuite-0.2.5

- old
+ new

@@ -20,15 +20,15 @@ }, }).returns(File.read('spec/support/fixtures/upsert/upsert_customer.xml')) end it 'makes a valid request to the NetSuite API' do - NetSuite::Actions::Upsert.call(customer) + NetSuite::Actions::Upsert.call([customer]) end it 'returns a valid Response object' do - response = NetSuite::Actions::Upsert.call(customer) + response = NetSuite::Actions::Upsert.call([customer]) response.should be_kind_of(NetSuite::Response) response.should be_success end end @@ -48,15 +48,15 @@ }, }).returns(File.read('spec/support/fixtures/upsert/upsert_invoice.xml')) end it 'makes a valid request to the NetSuite API' do - NetSuite::Actions::Upsert.call(invoice) + NetSuite::Actions::Upsert.call([invoice]) end it 'returns a valid Response object' do - response = NetSuite::Actions::Upsert.call(invoice) + response = NetSuite::Actions::Upsert.call([invoice]) response.should be_kind_of(NetSuite::Response) response.should be_success end end @@ -81,10 +81,10 @@ error.code.should eq('INVALID_KEY_OR_REF') error.message.should eq('The specified key is invalid.') end it 'provides an error method on the response' do - response = NetSuite::Actions::Upsert.call(invoice) + response = NetSuite::Actions::Upsert.call([invoice]) response.errors.first.should be_kind_of(NetSuite::Error) end end context 'when not successful with multiple errors' do