mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 14:36:22 +02:00
added generator reference number which comes from billing system
This commit is contained in:
parent
9b6b8a5e2f
commit
84669297b5
8 changed files with 86 additions and 26 deletions
|
@ -25,6 +25,19 @@ class AdminAreaInvoicesIntegrationTest < ApplicationIntegrationTest
|
|||
|
||||
def test_create_new_invoice
|
||||
invoice_n = Invoice.order(number: :desc).last.number
|
||||
|
||||
stub_request(:post, "http://eis_billing_system:3000/api/v1/invoice_generator/invoice_generator").
|
||||
with(
|
||||
body: "{\"transaction_amount\":\"1200.0\",\"order_reference\":4,\"customer_name\":\"Best Names\",\"customer_email\":\"info@bestnames.test\",\"custom_field_1\":\"\",\"custom_field_2\":\"registry\",\"invoice_number\":4}",
|
||||
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: "{\"everypay_link\":\"http://link.test\"}", headers: {})
|
||||
|
||||
stub_request(:post, "http://eis_billing_system:3000/api/v1/invoice_generator/invoice_number_generator").
|
||||
with(
|
||||
headers: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue