Sha256: 4948b84557904331052dea6c374967e4f6e3086ff1e77044ad01e39f0d0dcd5d

Contents?: true

Size: 817 Bytes

Versions: 5

Compression:

Stored size: 817 Bytes

Contents

require 'spec_helper'

describe NetSuite::Records::RecordRef do
  let(:null_field_list) { NetSuite::Records::NullFieldList.new }

  describe '#to_record' do
    it 'can represent itself as a SOAP record for single value' do
      null_field_list.name = 'blah'
      record = {
        'platformCore:name' => 'blah'
      }
      expect(null_field_list.to_record).to eql(record)
    end

    it 'can represent itself as a SOAP record for multiple values' do
      null_field_list.name = ['blah', 'foo']
      record = {
        'platformCore:name' => ['blah', 'foo']
      }
      expect(null_field_list.to_record).to eql(record)
    end
  end

  describe '#record_type' do
    it 'returns a string of the SOAP type' do
      expect(null_field_list.record_type).to eql('platformCore:NullFieldList')
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
netsuite-0.9.3 spec/netsuite/records/null_field_list_spec.rb
netsuite-0.9.2 spec/netsuite/records/null_field_list_spec.rb
netsuite-0.9.1 spec/netsuite/records/null_field_list_spec.rb
netsuite-0.9.0 spec/netsuite/records/null_field_list_spec.rb
netsuite-0.8.12 spec/netsuite/records/null_field_list_spec.rb