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.5.6 spec/netsuite/records/units_type_spec.rb
netsuite-0.5.5 spec/netsuite/records/units_type_spec.rb
netsuite-0.5.4 spec/netsuite/records/units_type_spec.rb
netsuite-0.5.3 spec/netsuite/records/units_type_spec.rb
netsuite-0.5.2 spec/netsuite/records/units_type_spec.rb
netsuite-0.5.1 spec/netsuite/records/units_type_spec.rb
netsuite-0.5.0 spec/netsuite/records/units_type_spec.rb
netsuite-0.4.9 spec/netsuite/records/units_type_spec.rb
netsuite-0.4.8 spec/netsuite/records/units_type_spec.rb
netsuite-0.4.7 spec/netsuite/records/units_type_spec.rb
netsuite-0.4.6 spec/netsuite/records/units_type_spec.rb
netsuite-0.4.5 spec/netsuite/records/units_type_spec.rb
netsuite-0.4.4 spec/netsuite/records/units_type_spec.rb
netsuite-0.4.3 spec/netsuite/records/units_type_spec.rb
netsuite-0.4.2 spec/netsuite/records/units_type_spec.rb
netsuite-0.4.1 spec/netsuite/records/units_type_spec.rb
netsuite-0.4.0 spec/netsuite/records/units_type_spec.rb
netsuite-0.3.3 spec/netsuite/records/units_type_spec.rb
netsuite-0.3.2 spec/netsuite/records/units_type_spec.rb
netsuite-0.3.1 spec/netsuite/records/units_type_spec.rb