Sha256: e9e855e83de27f58ffeeba50b57615593094ce7b32362d6805b19e2c0e629b37
Contents?: true
Size: 1.04 KB
Versions: 33
Compression:
Stored size: 1.04 KB
Contents
require 'spec_helper' describe NetSuite::Records::AssemblyItem do let(:item) { described_class.new } describe '#member_list' do it 'can be set from attributes' do attributes = { :item_member => [{ :item => { :internal_id => 1 }, :quantity => 20 }] } item.member_list = attributes expect(item.member_list).to be_kind_of(NetSuite::Records::MemberList) expect(item.member_list.item_member.length).to eql(1) expect(item.member_list.item_member.first.item.internal_id).to eq(1) expect(item.member_list.item_member.first.quantity).to eq(20) end end describe '#subsidiary_list' do it 'creates record refs from attributes' do item = described_class.new({ subsidiary_list: { record_ref: [ { internal_id: 1 }, { internal_id: 2 }, ] } }) expect(item.subsidiary_list.record_ref[0].internal_id).to eq(1) expect(item.subsidiary_list.record_ref[1].internal_id).to eq(2) end end end
Version data entries
33 entries across 33 versions & 1 rubygems