Sha256: 29a7fcadabc7188d3b8589622ad3d75571a24850bd3f9d87b4454776799a275c

Contents?: true

Size: 892 Bytes

Versions: 46

Compression:

Stored size: 892 Bytes

Contents

require 'spec_helper'

describe NetSuite::Records::CustomerAddressbookList do
  let(:list) { NetSuite::Records::CustomerAddressbookList.new }

  it 'has an addressbooks attribute' do
    expect(list.addressbook).to be_kind_of(Array)
  end

  describe '#to_record' do
    it 'can represent itself as a SOAP record' do
      list.replace_all = true

      record = {
        'listRel:addressbook' => [],
        'listRel:replaceAll' => true
      }
      expect(list.to_record).to eql(record)
    end
  end

  describe "#replace_all" do
    it "can be changed via accessor" do
      list.replace_all = false

      expect(list.replace_all).to eql(false)
    end

    it "coerces to a boolean" do
      list.replace_all = "goober"

      record = {
        'listRel:addressbook' => [],
        'listRel:replaceAll' => true
      }

      expect(list.to_record).to eql(record)
    end
  end

end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
netsuite-0.7.6 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.7.5 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.7.4 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.7.3 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.7.2 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.7.1 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.7.0 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.6.9 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.6.8 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.6.7 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.6.6 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.6.5 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.6.4 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.6.3 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.6.2 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.6.1 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.6.0 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.5.9 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.5.8 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.5.7 spec/netsuite/records/customer_addressbook_list_spec.rb