diff --git a/backend/app/controllers/spree/admin/payments_controller.rb b/backend/app/controllers/spree/admin/payments_controller.rb index 49de6cbf1ed..fa89e3c0204 100644 --- a/backend/app/controllers/spree/admin/payments_controller.rb +++ b/backend/app/controllers/spree/admin/payments_controller.rb @@ -78,7 +78,7 @@ def object_params def load_data @amount = params[:amount] || load_order.total - @payment_methods = Spree::PaymentMethod.available_to_admin + @payment_methods = Spree::PaymentMethod.active.available_to_admin if @payment && @payment.payment_method @payment_method = @payment.payment_method else diff --git a/backend/spec/controllers/spree/admin/payments_controller_spec.rb b/backend/spec/controllers/spree/admin/payments_controller_spec.rb index 9c4eb984e67..c5f98f1528e 100644 --- a/backend/spec/controllers/spree/admin/payments_controller_spec.rb +++ b/backend/spec/controllers/spree/admin/payments_controller_spec.rb @@ -92,7 +92,7 @@ module Admin @payment_method = create(:check_payment_method, available_to_admin: true, active: false) end - it "does not load the payment method", :pending do + it "does not load the payment method" do get :new, params: { order_id: order.number } expect(response.status).to eq(200) expect(assigns[:payment_methods]).to be_empty