mirror of
https://github.com/internetee/registry.git
synced 2025-07-26 04:28:27 +02:00
added test for reproduce the issue
This commit is contained in:
parent
b2e5cde55d
commit
8d37c22c04
1 changed files with 13 additions and 0 deletions
|
@ -180,6 +180,19 @@ class BankTransactionTest < ActiveSupport::TestCase
|
||||||
statement.description = "all invalid 12 123 55 77777 --"
|
statement.description = "all invalid 12 123 55 77777 --"
|
||||||
assert_nil statement.parsed_ref_number
|
assert_nil statement.parsed_ref_number
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_manual_bind_with_wrong_ref_number
|
||||||
|
invoice_ref_no = '1111'
|
||||||
|
bank_transaction_ref_no = '9999'
|
||||||
|
create_payable_invoice(number: '2222', total: 10, reference_no: invoice_ref_no)
|
||||||
|
transaction = BankTransaction.new(description: 'invoice #2222',
|
||||||
|
sum: 10,
|
||||||
|
reference_no: bank_transaction_ref_no)
|
||||||
|
|
||||||
|
assert_difference 'AccountActivity.count' do
|
||||||
|
transaction.bind_invoice('2222')
|
||||||
|
end
|
||||||
|
end
|
||||||
private
|
private
|
||||||
|
|
||||||
def create_payable_invoice(attributes)
|
def create_payable_invoice(attributes)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue