Test balance reloading after bank transfer without invoice

This commit is contained in:
Karl Erik Õunapuu 2020-09-08 13:49:20 +03:00
parent 17188ec635
commit 1a56fcf179
No known key found for this signature in database
GPG key ID: C9DD647298A34764

View file

@ -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