From fecc3061c8ea183e68fe54c455f508f08e8e4e01 Mon Sep 17 00:00:00 2001 From: olegphenomenon Date: Fri, 5 May 2023 13:22:33 +0300 Subject: [PATCH] comment out payment check verification --- app/models/payment_order.rb | 2 +- test/models/payment_orders_test.rb | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/models/payment_order.rb b/app/models/payment_order.rb index 5e7069e1be..4722b4fa3a 100644 --- a/app/models/payment_order.rb +++ b/app/models/payment_order.rb @@ -12,7 +12,7 @@ class PaymentOrder < ApplicationRecord belongs_to :invoice, optional: false validate :invoice_cannot_be_already_paid, on: :create - validate :supported_payment_method + # validate :supported_payment_method enum status: { issued: 'issued', paid: 'paid', cancelled: 'cancelled', failed: 'failed' } diff --git a/test/models/payment_orders_test.rb b/test/models/payment_orders_test.rb index 43996c6bc4..cd51c0cc04 100644 --- a/test/models/payment_orders_test.rb +++ b/test/models/payment_orders_test.rb @@ -76,12 +76,6 @@ def test_can_not_create_order_for_paid_invoice assert_includes payment_order.errors[:invoice], 'is already paid' end - def test_order_without_channel_is_invalid - payment_order = PaymentOrder.new - assert payment_order.invalid? - assert_includes payment_order.errors[:type], 'is not supported' - end - def test_can_not_create_order_with_invalid_type assert_raise NameError do PaymentOrder.new_with_type(type: 'not_implemented', invoice: Invoice.new)