Sha256: 56f786fa81c9e4e5b0951cddf2cba06a794597143027df5bfa2e8ada59472553
Contents?: true
Size: 1.04 KB
Versions: 4
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true require 'credentials' require 'helper' require 'recorder' class IntegrationTest < MiniTest::Test include Recorder class << self def use(endpoint) @current_endpoint = endpoint end def clients @clients ||= build_clients end private def build_clients klass = MWS.const_get("#{current_endpoint}::Client") ::Credentials.map { |credentials| klass.new(credentials) }.shuffle end def current_endpoint @current_endpoint || name.sub('Test', '') end end def clients self.class.clients end end ::Peddler::VCRMatcher.ignore_seller! VCR.configure do |c| c.before_record do |interaction| %w[ BuyerName BuyerEmail Name AddressLine1 PostalCode Phone Amount ].each do |key| interaction.response.body.gsub!(/<#{key}>[^<]+</, "<#{key}>FILTERED<") end end Credentials.each do |record| c.filter_sensitive_data('FILTERED') { record['merchant_id'] } c.filter_sensitive_data('FILTERED') { record['aws_access_key_id'] } end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
peddler-1.6.7 | test/integration_helper.rb |
peddler-1.6.6 | test/integration_helper.rb |
peddler-1.6.5 | test/integration_helper.rb |
peddler-1.6.4 | test/integration_helper.rb |