Sha256: 446263ff105a11b2d8a188aaf1b5722a61f2d83e75267b18552b866a853bd991
Contents?: true
Size: 1.25 KB
Versions: 17
Compression:
Stored size: 1.25 KB
Contents
# frozen_string_literal: true require_relative "../test_helper" module Telnyx class TelnyxNumberOrderTest < Test::Unit::TestCase should "be listable" do number_orders = Telnyx::NumberOrder.list assert_requested :get, "#{Telnyx.api_base}/v2/number_orders" assert_kind_of Telnyx::ListObject, number_orders assert_kind_of Telnyx::NumberOrder, number_orders.first end should "be creatable" do Telnyx::NumberOrder.create( phone_numbers: [ { "phone_number" => "+12223334444", "regulatory_requirements" => [] }, ], customer_reference: "MY REF 001", connection_id: "442191469269222625" ) assert_requested :post, "#{Telnyx.api_base}/v2/number_orders" end should "be retrievable" do number_order = Telnyx::NumberOrder.retrieve "123" assert_requested :get, "#{Telnyx.api_base}/v2/number_orders/123" assert_kind_of Telnyx::NumberOrder, number_order end should "be savable" do number_order = Telnyx::NumberOrder.retrieve "123" number_order.customer_reference = "foobar" number_order.save assert_requested :patch, "#{Telnyx.api_base}/v2/number_orders/123" assert_kind_of Telnyx::NumberOrder, number_order end end end
Version data entries
17 entries across 17 versions & 1 rubygems