mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 13:36:15 +02:00
updated tests
This commit is contained in:
parent
a9ea8e92a1
commit
03101a599f
2 changed files with 32 additions and 0 deletions
15
test/services/send_data_to_directo_test.rb
Normal file
15
test/services/send_data_to_directo_test.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
require 'test_helper'
|
||||
|
||||
class SendDataToDirectoTest < ActiveSupport::TestCase
|
||||
setup do
|
||||
Spy.on_instance_method(EisBilling::BaseController, :authorized).and_return(true)
|
||||
end
|
||||
|
||||
def test_should_send_data_to_billing_directo
|
||||
stub_request(:post, "http://eis_billing_system:3000/api/v1/directo/directo").
|
||||
to_return(status: 200, body: "ok", headers: {})
|
||||
|
||||
res = EisBilling::SendDataToDirecto.send_request(object_data: [], monthly: true, dry: true)
|
||||
assert_equal res.body, "ok"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue