Sha256: 6a4fe013c62cd5aadaac9b6864b719a54f080690fe1d9c5a71d1df432c2cc522

Contents?: true

Size: 874 Bytes

Versions: 3

Compression:

Stored size: 874 Bytes

Contents

# frozen_string_literal: true

support :adaptor_helpers,
        :netsuite_soap_shared_examples

module NetSuiteSOAPHelpers
  include AdaptorHelpers

  def adaptor_class
    LedgerSync::Adaptors::NetSuiteSOAP::Adaptor
  end

  def existing_subsidiary_resource
    LedgerSync::Subsidiary.new(
      ledger_id: 2,
      name: "QA Subsidary #{test_run_id}"
    )
  end

  def netsuite_soap_adaptor
    @netsuite_soap_adaptor ||= LedgerSync.adaptors.netsuite_soap.new(
      account_id: ENV.fetch('NETSUITE_SOAP_ACCOUNT_ID'),
      consumer_key: ENV.fetch('NETSUITE_SOAP_CONSUMER_KEY'),
      consumer_secret: ENV.fetch('NETSUITE_SOAP_CONSUMER_SECRET'),
      token_id: ENV.fetch('NETSUITE_SOAP_TOKEN_ID'),
      token_secret: ENV.fetch('NETSUITE_SOAP_TOKEN_SECRET')
    )
  end
end

RSpec.configure do |config|
  config.include NetSuiteSOAPHelpers, adaptor: :netsuite_soap
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ledger_sync-1.3.3 qa/support/netsuite_soap_helpers.rb
ledger_sync-1.3.2 qa/support/netsuite_soap_helpers.rb
ledger_sync-1.3.1 qa/support/netsuite_soap_helpers.rb