Sha256: dae7e9eeda03afc331d992b7e282c2888932140279a2e22f827ad2321f299328

Contents?: true

Size: 707 Bytes

Versions: 4

Compression:

Stored size: 707 Bytes

Contents

require 'spec_helper'

describe NetSuite::Records::ItemFulfillmentPackageUpsList do
  let(:list) { NetSuite::Records::ItemFulfillmentPackageUpsList.new }

  it 'has a packages attribute' do
    expect(list.packages).to be_kind_of(Array)
  end

  describe '#to_record' do
    before do
      list.packages << NetSuite::Records::ItemFulfillmentPackageUps.new(
        :package_tracking_number_ups => '1Z12354645757686786'
      )
    end

    it 'can represent itself as a SOAP record' do
      record = {
          'tranSales:packageUps' => [
            'tranSales:packageTrackingNumberUps' => '1Z12354645757686786'
          ]
        }
      
      expect(list.to_record).to eql(record)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
netsuite-0.9.3 spec/netsuite/records/item_fulfillment_package_ups_list_spec.rb
netsuite-0.9.2 spec/netsuite/records/item_fulfillment_package_ups_list_spec.rb
netsuite-0.9.1 spec/netsuite/records/item_fulfillment_package_ups_list_spec.rb
netsuite-0.9.0 spec/netsuite/records/item_fulfillment_package_ups_list_spec.rb