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.5.6 spec/netsuite/records/ship_address_spec.rb
netsuite-0.5.5 spec/netsuite/records/ship_address_spec.rb
netsuite-0.5.4 spec/netsuite/records/ship_address_spec.rb
netsuite-0.5.3 spec/netsuite/records/ship_address_spec.rb
netsuite-0.5.2 spec/netsuite/records/ship_address_spec.rb
netsuite-0.5.1 spec/netsuite/records/ship_address_spec.rb
netsuite-0.5.0 spec/netsuite/records/ship_address_spec.rb
netsuite-0.4.9 spec/netsuite/records/ship_address_spec.rb
netsuite-0.4.8 spec/netsuite/records/ship_address_spec.rb
netsuite-0.4.7 spec/netsuite/records/ship_address_spec.rb
netsuite-0.4.6 spec/netsuite/records/ship_address_spec.rb
netsuite-0.4.5 spec/netsuite/records/ship_address_spec.rb
netsuite-0.4.4 spec/netsuite/records/ship_address_spec.rb
netsuite-0.4.3 spec/netsuite/records/ship_address_spec.rb
netsuite-0.4.2 spec/netsuite/records/ship_address_spec.rb
netsuite-0.4.1 spec/netsuite/records/ship_address_spec.rb
netsuite-0.4.0 spec/netsuite/records/ship_address_spec.rb
netsuite-0.3.3 spec/netsuite/records/ship_address_spec.rb
netsuite-0.3.2 spec/netsuite/records/ship_address_spec.rb
netsuite-0.3.1 spec/netsuite/records/ship_address_spec.rb