Sha256: 7e0caca92bf9f15b52a98828dbcd1aed94166e2b11d07a611ebfe1db2190a55b

Contents?: true

Size: 566 Bytes

Versions: 60

Compression:

Stored size: 566 Bytes

Contents

require 'spec_helper'

describe NetSuite::Records::SalesOrderItemList do
  let(:list) { NetSuite::Records::SalesOrderItemList.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::SalesOrderItem.new(
        :rate => 10
      )
    end

    it 'can represent itself as a SOAP record' do
      record =  {
        'tranSales:item' => [{
          'tranSales:rate' => 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.5.6 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.5.5 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.5.4 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.5.3 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.5.2 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.5.1 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.5.0 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.4.9 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.4.8 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.4.7 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.4.6 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.4.5 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.4.4 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.4.3 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.4.2 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.4.1 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.4.0 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.3.3 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.3.2 spec/netsuite/records/sales_order_item_list_spec.rb
netsuite-0.3.1 spec/netsuite/records/sales_order_item_list_spec.rb