Sha256: fca4b61e3cd3f21b600b37bad5b3f23f64cca7338b2034ea04cfb90bf57d791a
Contents?: true
Size: 1.75 KB
Versions: 60
Compression:
Stored size: 1.75 KB
Contents
require 'spec_helper' describe NetSuite::Records::BillAddress do let(:bill_address) { NetSuite::Records::BillAddress.new } it 'has all the right fields' do [ :bill_attention, :bill_addressee, :bill_phone, :bill_addr1, :bill_addr2, :bill_addr3, :bill_city, :bill_state, :bill_zip, :bill_country ].each do |field| expect(bill_address).to have_field(field) end end describe '#to_record' do before do bill_address.bill_attention = 'Mr. Smith' bill_address.bill_addressee = 'Mr. Robert Smith' bill_address.bill_phone = '1234567890' bill_address.bill_addr1 = '123 Happy Lane' bill_address.bill_addr2 = '#4' bill_address.bill_addr3 = 'Box 6' bill_address.bill_city = 'Los Angeles' bill_address.bill_state = 'CA' bill_address.bill_zip = '90007' bill_address.bill_country = '_unitedStates' end it 'can represent itself as a SOAP record' do record = { 'platformCommon:billAttention' => 'Mr. Smith', 'platformCommon:billAddressee' => 'Mr. Robert Smith', 'platformCommon:billPhone' => '1234567890', 'platformCommon:billAddr1' => '123 Happy Lane', 'platformCommon:billAddr2' => '#4', 'platformCommon:billAddr3' => 'Box 6', 'platformCommon:billCity' => 'Los Angeles', 'platformCommon:billState' => 'CA', 'platformCommon:billZip' => '90007', 'platformCommon:billCountry' => '_unitedStates' } expect(bill_address.to_record).to eql(record) end end describe 'record_namespace' do it 'belongs to the platformCommon namespace' do expect(bill_address.record_namespace).to eql('platformCommon') end end end
Version data entries
60 entries across 60 versions & 1 rubygems