diff --git a/app/controllers/checkout_controller.rb b/app/controllers/checkout_controller.rb index 904d0d5b05c..b41eeb52658 100644 --- a/app/controllers/checkout_controller.rb +++ b/app/controllers/checkout_controller.rb @@ -80,7 +80,7 @@ def confirm_order # Redeem VINE voucher vine_voucher_redeemer = Vine::VoucherRedeemerService.new(order: @order) - if vine_voucher_redeemer.redeem == false + unless vine_voucher_redeemer.redeem # rubocop:disable Rails/DeprecatedActiveModelErrorsMethods flash[:error] = if vine_voucher_redeemer.errors.keys.include?(:redeeming_failed) vine_voucher_redeemer.errors[:redeeming_failed] diff --git a/spec/requests/spree/admin/payments_spec.rb b/spec/requests/spree/admin/payments_spec.rb index 7992064410f..f8e9f6e3c6e 100644 --- a/spec/requests/spree/admin/payments_spec.rb +++ b/spec/requests/spree/admin/payments_spec.rb @@ -47,7 +47,7 @@ end end - context "when a getway error happens" do + context "when a gateway error happens" do let(:payment_method) do create(:stripe_sca_payment_method, distributors: [order.distributor]) end