added link generator into admin part

This commit is contained in:
olegphenomenon 2022-01-26 13:24:58 +02:00
parent 9f4942e522
commit 9b6b8a5e2f
8 changed files with 135 additions and 2 deletions

View file

@ -54,6 +54,17 @@ class AdminAreaBankStatementTest < ApplicationSystemTestCase
end
def test_can_bind_statement_transactions
invoice_n = Invoice.order(number: :desc).last.number
stub_request(:post, "http://eis_billing_system:3000/api/v1/invoice_generator/invoice_number_generator").
with(
headers: {
'Accept'=>'Bearer WA9UvDmzR9UcE5rLqpWravPQtdS8eDMAIynzGdSOTw==--9ZShwwij3qmLeuMJ--NE96w2PnfpfyIuuNzDJTGw==',
'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'Authorization'=>'Bearer foobar',
'Content-Type'=>'application/json',
'User-Agent'=>'Ruby'
}).
to_return(status: 200, body: "{\"invoice_number\":\"#{invoice_n + 3}\"}", headers: {})
registrar = registrars(:bestnames)
registrar.issue_prepayment_invoice(500)
invoice = registrar.invoices.last