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.7.6 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.7.5 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.7.4 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.7.3 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.7.2 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.7.1 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.7.0 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.6.9 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.6.8 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.6.7 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.6.6 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.6.5 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.6.4 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.6.3 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.6.2 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.6.1 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.6.0 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.5.9 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.5.8 spec/netsuite/records/cash_sale_item_list_spec.rb
netsuite-0.5.7 spec/netsuite/records/cash_sale_item_list_spec.rb