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.9.3 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.9.2 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.9.1 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.9.0 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.12 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.11 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.10 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.9 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.8 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.7 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.6 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.5 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.4 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.3 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.2 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.1 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.8.0 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.7.9 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.7.8 spec/netsuite/records/customer_addressbook_list_spec.rb
netsuite-0.7.7 spec/netsuite/records/customer_addressbook_list_spec.rb