diff --git a/test/tasks/invoices/process_payments_test.rb b/test/tasks/invoices/process_payments_test.rb index bd447be29..38c2e8fdc 100644 --- a/test/tasks/invoices/process_payments_test.rb +++ b/test/tasks/invoices/process_payments_test.rb @@ -82,6 +82,18 @@ class ProcessPaymentsTaskTest < ActiveSupport::TestCase assert payment_order.failed? end + def test_credits_registrar_account_without_invoice_beforehand + registrar = registrars(:bestnames) + + assert_changes -> { registrar.accounts.first.balance } do + run_task + end + + assert_changes -> { registrar.invoices.count } do + run_task + end + end + def test_output assert_output "Transactions processed: 1\n" do run_task