mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 14:36:22 +02:00
updated tests
This commit is contained in:
parent
f0cf47cd66
commit
cd81e58ff6
5 changed files with 22 additions and 6 deletions
|
@ -12,6 +12,18 @@ class ReppV1InvoicesAddCreditTest < ActionDispatch::IntegrationTest
|
|||
eis_response = OpenStruct.new(body: '{"everypay_link":"https://link.test"}')
|
||||
Spy.on_instance_method(EisBilling::AddDeposits, :send_invoice).and_return(eis_response)
|
||||
Spy.on_instance_method(EisBilling::BaseController, :authorized).and_return(true)
|
||||
|
||||
invoice = Invoice.last
|
||||
msg = {
|
||||
invoice_number: invoice.number + 3
|
||||
}
|
||||
stub_request(:post, "https://eis_billing_system:3000/api/v1/invoice_generator/invoice_number_generator")
|
||||
.to_return(status: 200, body: msg.to_json, headers: {})
|
||||
|
||||
msg2 = {
|
||||
message: 'success'
|
||||
}
|
||||
stub_request(:post, "https://eis_billing_system:3000/api/v1/e_invoice/e_invoice").to_return(status: 200, body: msg2.to_json, headers: {})
|
||||
end
|
||||
|
||||
teardown do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue