Sha256: c18eb333a14a25eba05a300b66a3e4e63697c443c535121b57a7d13f98f64e86

Contents?: true

Size: 960 Bytes

Versions: 2

Compression:

Stored size: 960 Bytes

Contents

# frozen_string_literal: true

RSpec.configure do |config|
  config.before(:example, :bolt_configuration) do
    solidus_bolt_configuration = SolidusBolt::BoltConfiguration.fetch

    solidus_bolt_configuration.environment = 'sandbox'
    solidus_bolt_configuration.api_key = ENV['BOLT_API_KEY']
    solidus_bolt_configuration.signing_secret = ENV['BOLT_SIGNING_SECRET']
    solidus_bolt_configuration.publishable_key = ENV['BOLT_PUBLISHABLE_KEY']

    solidus_bolt_configuration.save!

    allow(SolidusBolt::BaseService).to receive(:generate_nonce).and_return('fakenonce')
    allow(SolidusBolt::BoltHelper).to receive(:nonce).and_return('helpernonce')
    allow(TweetNaCl).to receive(:crypto_box_keypair).and_return(
      [
        "\x8C\xEB\x1C^(\x99\n\xC9\xFE\x9D\xF5\xC5z\xD0E\xFBs\xA7\xD2p\x16\x81\xE7O\xF3\xB6[%B\xA2\xCC<",
        "\x86(\x1D\x8B2s\x7F\xD0\xB1\xCC\"\x83\xE2Lqy4\xF6\x1D\xAA\xA1\xD5\e\x16#a\x1E\xF0F\xCF\xE1\t"
      ]
    )
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_bolt-0.4.0 spec/support/bolt_configuration.rb
solidus_bolt-0.3.0 spec/support/bolt_configuration.rb