mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
And also STRIPE_ENDPOINT_SECRET just in case it's ever used in tests. Re-records Stripe tests. But some failed... :'( Failed examples: rspec ./spec/lib/stripe/credit_card_cloner_spec.rb:71 # Stripe::CreditCardCloner#find_or_clone when called with a valid customer and payment_method clones both the payment method and the customer rspec ./spec/lib/stripe/payment_intent_validator_spec.rb[1:1:1:1:17:1:2] # Stripe::PaymentIntentValidator#call when payment intent is valid valid non-3D credit cards are correctly handled behaves like payments intents from UnionPay (debit) captures the payment
23 lines
596 B
Ruby
23 lines
596 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'vcr'
|
|
|
|
VCR.configure do |config|
|
|
config.cassette_library_dir = "spec/fixtures/vcr_cassettes"
|
|
config.hook_into :webmock
|
|
config.ignore_localhost = true
|
|
config.configure_rspec_metadata!
|
|
config.ignore_hosts('localhost', '127.0.0.1', '0.0.0.0', 'api.knapsackpro.com')
|
|
|
|
# Filter sensitive environment variables
|
|
%w[
|
|
STRIPE_INSTANCE_SECRET_KEY
|
|
STRIPE_CUSTOMER
|
|
STRIPE_ACCOUNT
|
|
STRIPE_CLIENT_ID
|
|
STRIPE_ENDPOINT_SECRET
|
|
].each do |env_var|
|
|
config.filter_sensitive_data("<HIDDEN-#{env_var}>") { ENV.fetch(env_var, nil) }
|
|
end
|
|
end
|