mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 22:46:22 +02:00
Troubleshoot invoice not paid in billing system
This commit is contained in:
parent
e86dae7eea
commit
91c471049a
5 changed files with 196 additions and 172 deletions
|
@ -8,35 +8,35 @@ class LhvConnectTransactionsIntegrationTest < ApplicationIntegrationTest
|
|||
end
|
||||
|
||||
def test_should_saved_transaction_data
|
||||
if Feature.billing_system_integrated?
|
||||
test_transaction_1 = OpenStruct.new(amount: 0.1,
|
||||
currency: 'EUR',
|
||||
date: Time.zone.today,
|
||||
payment_reference_number: '2199812',
|
||||
payment_description: "description 2199812")
|
||||
return unless Feature.billing_system_integrated?
|
||||
|
||||
test_transaction_2 = OpenStruct.new(amount: 0.1,
|
||||
currency: 'EUR',
|
||||
date: Time.zone.today,
|
||||
payment_reference_number: '2199813',
|
||||
payment_description: "description 2199813")
|
||||
test_transaction_1 = OpenStruct.new(amount: 0.1,
|
||||
currency: 'EUR',
|
||||
date: Time.zone.today,
|
||||
payment_reference_number: '2199812',
|
||||
payment_description: 'description 2199812')
|
||||
|
||||
test_transaction_3 = OpenStruct.new(amount: 0.1,
|
||||
currency: 'EUR',
|
||||
date: Time.zone.today,
|
||||
payment_reference_number: '2199814',
|
||||
payment_description: "description 2199814")
|
||||
test_transaction_2 = OpenStruct.new(amount: 0.1,
|
||||
currency: 'EUR',
|
||||
date: Time.zone.today,
|
||||
payment_reference_number: '2199813',
|
||||
payment_description: 'description 2199813')
|
||||
|
||||
lhv_transactions = []
|
||||
lhv_transactions << test_transaction_1
|
||||
lhv_transactions << test_transaction_2
|
||||
lhv_transactions << test_transaction_3
|
||||
test_transaction_3 = OpenStruct.new(amount: 0.1,
|
||||
currency: 'EUR',
|
||||
date: Time.zone.today,
|
||||
payment_reference_number: '2199814',
|
||||
payment_description: 'description 2199814')
|
||||
|
||||
assert_difference 'BankStatement.count', 3 do
|
||||
assert_difference 'BankTransaction.count', 3 do
|
||||
post eis_billing_lhv_connect_transactions_path, params: { "_json" => JSON.parse(lhv_transactions.to_json) },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
lhv_transactions = []
|
||||
lhv_transactions << test_transaction_1
|
||||
lhv_transactions << test_transaction_2
|
||||
lhv_transactions << test_transaction_3
|
||||
|
||||
assert_difference 'BankStatement.count', 1 do
|
||||
assert_difference 'BankTransaction.count', 3 do
|
||||
post eis_billing_lhv_connect_transactions_path, params: { '_json' => JSON.parse(lhv_transactions.to_json) },
|
||||
headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue