Sha256: aa19fdaf69dbf54e45184ddf1d09184494ac442616782dd68cd8db713eaf64e4

Contents?: true

Size: 856 Bytes

Versions: 60

Compression:

Stored size: 856 Bytes

Contents

require 'spec_helper'

describe NetSuite::Records::UnitsType do
  let(:units_type) { described_class.new }

  it 'has all the right fields' do
    [
      :is_inactive, :name
    ].each do |field|
      expect(units_type).to have_field(field)
    end
  end

  describe '#uom_list' do
    it 'can be set from attributes' do
      attributes = [{
        uom: {
          abbreviation: '6 oz',
          conversion_rate: 1.4
        }
      }]
      units_type.uom_list.uom = attributes
      expect(units_type.uom_list).to be_kind_of(NetSuite::Records::UnitsTypeUomList)
      expect(units_type.uom_list.uom.length).to eql(1)
    end

    it 'can be set from a units_typeItemList object' do
      item_list = NetSuite::Records::UnitsTypeUomList.new
      units_type.uom_list = item_list
      expect(units_type.uom_list).to eql(item_list)
    end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

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