Sha256: bbe6da748ccaa05eea8b0d1254ad3ff4fea17dc9b022c178a68a8d61a5b114b6

Contents?: true

Size: 989 Bytes

Versions: 60

Compression:

Stored size: 989 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|
      expect(ship_address).to 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'
      }
      expect(ship_address.to_record).to eql(record)
    end
  end

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

end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
netsuite-0.9.3 spec/netsuite/records/ship_address_spec.rb
netsuite-0.9.2 spec/netsuite/records/ship_address_spec.rb
netsuite-0.9.1 spec/netsuite/records/ship_address_spec.rb
netsuite-0.9.0 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.12 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.11 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.10 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.9 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.8 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.7 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.6 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.5 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.4 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.3 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.2 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.1 spec/netsuite/records/ship_address_spec.rb
netsuite-0.8.0 spec/netsuite/records/ship_address_spec.rb
netsuite-0.7.9 spec/netsuite/records/ship_address_spec.rb
netsuite-0.7.8 spec/netsuite/records/ship_address_spec.rb
netsuite-0.7.7 spec/netsuite/records/ship_address_spec.rb