M lib/sip_account.rb => lib/sip_account.rb +1 -0
@@ 4,6 4,7 @@ require "digest"
require "securerandom"
require "value_semantics/monkey_patched"
+require_relative "bandwidth_iris_patch"
require_relative "mn_words"
class SipAccount
M test/test_customer.rb => test/test_customer.rb +12 -2
@@ 156,7 156,12 @@ class CustomerTest < Minitest::Test
headers: {
"Authorization" => "Basic Og=="
}
- ).to_return(status: 404)
+ ).to_return(
+ status: 404,
+ body:
+ "<r><ResponseStatus><ErrorCode>0</ErrorCode>" \
+ "<Description>desc</Description></ResponseStatus></r>"
+ )
sip = customer.sip_account
assert_kind_of SipAccount::New, sip
assert_equal "test", sip.username
@@ 191,7 196,12 @@ class CustomerTest < Minitest::Test
stub_request(
:get,
"https://dashboard.bandwidth.com/v1.0/accounts//sipcredentials/test"
- ).to_return(status: 404)
+ ).to_return(
+ status: 404,
+ body:
+ "<r><ResponseStatus><ErrorCode>0</ErrorCode>" \
+ "<Description>desc</Description></ResponseStatus></r>"
+ )
assert_equal "test", customer.sip_account.username
end