Sha256: 1cbd7086d189de0a83f0d85b501033419e0bbff287333396f29dec854a47efd9

Contents?: true

Size: 637 Bytes

Versions: 60

Compression:

Stored size: 637 Bytes

Contents

require 'spec_helper'

describe NetSuite::Records::InvoiceItemList do
  let(:list) { NetSuite::Records::InvoiceItemList.new }
  let(:item) { NetSuite::Records::InvoiceItem.new }

  it 'can have items be added to it' do
    list.items << item
    item_list = list.items
    expect(item_list).to be_kind_of(Array)
    expect(item_list.length).to eql(1)
    item_list.each { |i| expect(i).to be_kind_of(NetSuite::Records::InvoiceItem) }
  end

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

end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
netsuite-0.7.6 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.7.5 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.7.4 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.7.3 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.7.2 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.7.1 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.7.0 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.6.9 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.6.8 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.6.7 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.6.6 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.6.5 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.6.4 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.6.3 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.6.2 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.6.1 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.6.0 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.5.9 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.5.8 spec/netsuite/records/invoice_item_list_spec.rb
netsuite-0.5.7 spec/netsuite/records/invoice_item_list_spec.rb