Sha256: 1fb79c3d984a4f4f75f3dadfe0de9dc19426908e0685f7083d27aba49960899c

Contents?: true

Size: 576 Bytes

Versions: 60

Compression:

Stored size: 576 Bytes

Contents

require 'spec_helper'

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

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

  describe '#to_record' do
    before do
      list.items << NetSuite::Records::WorkOrderItem.new(
        :average_cost => 10
      )
    end

    it 'can represent itself as a SOAP record' do
      record =  {
        'tranInvt:item' => [{
          'tranInvt:averageCost' => 10
        }]
      }
      expect(list.to_record).to eql(record)
    end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

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