Sha256: 53b62c6ddec7f9cf753c80fff764754dad8127f1d55abf303e4862a70aa60a02
Contents?: true
Size: 753 Bytes
Versions: 13
Compression:
Stored size: 753 Bytes
Contents
# frozen_string_literal: true module Telnyx class NumberReservationTest < Test::Unit::TestCase should "be listable" do number_reservations = Telnyx::NumberReservation.list assert_requested :get, "#{Telnyx.api_base}/v2/number_reservations" assert_kind_of Telnyx::ListObject, number_reservations assert_kind_of Telnyx::NumberReservation, number_reservations.first end should "call extend" do number_reservation = Telnyx::NumberReservation.list.first stub = stub_request(:post, "#{Telnyx.api_base}/v2/number_reservations/#{number_reservation.id}/actions/extend") .to_return(body: JSON.generate(id: "123")) number_reservation.extend_number assert_requested stub end end end
Version data entries
13 entries across 13 versions & 1 rubygems