Sha256: a232431bd7a6f31ec5b34e0a3e3181ebc8f333d27f98081a99e845682516e53b

Contents?: true

Size: 890 Bytes

Versions: 13

Compression:

Stored size: 890 Bytes

Contents

require 'spec_helper'

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

  it 'has an customer_sales_team attribute' do
    expect(list.sales_team).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:salesTeam' => [],
        '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:salesTeam' => [],
        'listRel:replaceAll' => true
      }

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

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
netsuite-0.9.3 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.9.2 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.9.1 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.9.0 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.8.12 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.8.11 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.8.10 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.8.9 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.8.8 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.8.7 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.8.6 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.8.5 spec/netsuite/records/customer_sales_team_list_spec.rb
netsuite-0.8.4 spec/netsuite/records/customer_sales_team_list_spec.rb