Sha256: fda2fb4ef7aee2f7991cd0507d24a0099dd873263b1c1866b7ca7a9313c8afeb

Contents?: true

Size: 565 Bytes

Versions: 57

Compression:

Stored size: 565 Bytes

Contents

require 'spec_helper'

describe NetSuite::Records::CashSaleItemList do
  let(:list) { NetSuite::Records::CashSaleItemList.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::CashSaleItem.new(
        :amount => 10
      )
    end

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

Version data entries

57 entries across 57 versions & 1 rubygems

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