From e6db62af50d326662fc348a93df65d2fab7d36f3 Mon Sep 17 00:00:00 2001 From: Miguel Pinto Date: Fri, 20 Dec 2024 16:08:54 +0000 Subject: [PATCH] feat: fix specs --- spec/factories/payments.rb | 5 +++++ .../services/payment_requests/payments/adyen_service_spec.rb | 1 + 2 files changed, 6 insertions(+) diff --git a/spec/factories/payments.rb b/spec/factories/payments.rb index 0c382fa3574..c3675e6f3c5 100644 --- a/spec/factories/payments.rb +++ b/spec/factories/payments.rb @@ -11,6 +11,11 @@ provider_payment_id { SecureRandom.uuid } status { 'pending' } + trait :adyen_payment do + association :payment_provider, factory: :adyen_provider + association :payment_provider_customer, factory: :adyen_customer + end + trait :requires_action do status { 'requires_action' } provider_payment_data do diff --git a/spec/services/payment_requests/payments/adyen_service_spec.rb b/spec/services/payment_requests/payments/adyen_service_spec.rb index 1f225b4d5a0..f2738f9d93a 100644 --- a/spec/services/payment_requests/payments/adyen_service_spec.rb +++ b/spec/services/payment_requests/payments/adyen_service_spec.rb @@ -426,6 +426,7 @@ let(:payment) do create( :payment, + :adyen_payment, payable: payment_request, provider_payment_id:, status: "Pending"