mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
Test valid invoice sums when created by bank transaction
This commit is contained in:
parent
1a56fcf179
commit
3decec8b02
4 changed files with 25 additions and 5 deletions
|
@ -109,4 +109,16 @@ class InvoiceTest < ActiveSupport::TestCase
|
|||
seller_zip: nil)
|
||||
assert_equal 'street, city, state', invoice.seller_address
|
||||
end
|
||||
|
||||
def test_assumes_correct_sum_amount_when_created_by_transaction
|
||||
registrar = registrars(:bestnames)
|
||||
|
||||
bank_transaction = bank_transactions(:one).dup
|
||||
bank_transaction.reference_no = registrar.reference_no
|
||||
bank_transaction.sum = 5
|
||||
bank_transaction.save
|
||||
|
||||
invoice = Invoice.create_from_transaction!(bank_transaction)
|
||||
assert_equal 5, invoice.total
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue