Sha256: a1bca43c7314b27f7c67972163f696cfbbfc4b6ce76f22df55c296f14bb43bbf

Contents?: true

Size: 977 Bytes

Versions: 47

Compression:

Stored size: 977 Bytes

Contents

require 'spec_helper'

describe NetSuite::Records::ShipAddress do
  let(:ship_address) { NetSuite::Records::ShipAddress.new }

  it 'has all the right fields' do
    [
      :ship_attention, :ship_addressee, :ship_phone, :ship_addr1, :ship_addr2, :ship_addr3,
      :ship_city, :ship_state, :ship_zip, :ship_country, :ship_is_residential
    ].each do |field|
      ship_address.should have_field(field)
    end
  end

  describe '#to_record' do
    before do
      ship_address.ship_attention = 'Mr. Smith'
      ship_address.ship_zip       = '90007'
    end

    it 'can represent itself as a SOAP record' do
      record = {
        'platformCommon:shipAttention' => 'Mr. Smith',
        'platformCommon:shipZip'       => '90007'
      }
      ship_address.to_record.should eql(record)
    end
  end

  describe '#record_type' do
    it 'returns a string of the SOAP record type' do
      ship_address.record_type.should eql('platformCommon:ShipAddress')
    end
  end

end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
netsuite-0.0.38 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.37 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.36 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.35 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.34 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.33 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.32 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.31 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.30 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.29 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.28 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.27 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.26 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.25 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.23 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.22 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.21 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.20 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.19 spec/netsuite/records/ship_address_spec.rb
netsuite-0.0.18 spec/netsuite/records/ship_address_spec.rb