Sha256: 8734159fc25981059e11709bc0ff1cbd1a77e3b4df3a9f3936d2affe2582a4c6

Contents?: true

Size: 812 Bytes

Versions: 3

Compression:

Stored size: 812 Bytes

Contents

# frozen_string_literal: true

support :adaptor_helpers,
        :netsuite_shared_examples

module NetSuiteHelpers
  include AdaptorHelpers

  def adaptor_class
    LedgerSync::Adaptors::NetSuite::Adaptor
  end

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

  def netsuite_adaptor
    @netsuite_adaptor ||= LedgerSync.adaptors.netsuite.new(
      account_id: ENV.fetch('NETSUITE_ACCOUNT_ID'),
      consumer_key: ENV.fetch('NETSUITE_CONSUMER_KEY'),
      consumer_secret: ENV.fetch('NETSUITE_CONSUMER_SECRET'),
      token_id: ENV.fetch('NETSUITE_TOKEN_ID'),
      token_secret: ENV.fetch('NETSUITE_TOKEN_SECRET')
    )
  end
end

RSpec.configure do |config|
  config.include NetSuiteHelpers, adaptor: :netsuite
end

Version data entries

3 entries across 3 versions & 1 rubygems

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