mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Merge remote-tracking branch 'origin/master' into refactor-contact-archivation
This commit is contained in:
commit
ab1fa9064e
47 changed files with 453 additions and 290 deletions
|
@ -82,6 +82,25 @@ 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_topup_creates_invoice_with_total_of_transactioned_amount
|
||||
registrar = registrars(:bestnames)
|
||||
run_task
|
||||
|
||||
assert_equal 0.1, registrar.invoices.last.total
|
||||
end
|
||||
|
||||
def test_output
|
||||
assert_output "Transactions processed: 1\n" do
|
||||
run_task
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue