Sha256: a5308960a7474761cc0d20692777b666dd137ae5732a7c9b8dc8a55fff3951dc

Contents?: true

Size: 812 Bytes

Versions: 5

Compression:

Stored size: 812 Bytes

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class SimCardOrderTest < Test::Unit::TestCase
    setup do
      @id = "d25f43b3-aea3-6a5d-7a1b-d83e5c100cce"
    end
    should "retrieve sim card order" do
      sim_card_order = SimCardOrder.retrieve @id
      assert_requested(:get, "#{Telnyx.api_base}/v2/sim_card_orders/#{@id}")
      assert_kind_of SimCardOrder, sim_card_order
    end

    should "list sim card orders" do
      simlist = SimCardOrder.list
      assert_requested(:get, "#{Telnyx.api_base}/v2/sim_card_orders")
      assert_kind_of Telnyx::ListObject, simlist
    end

    should "create sim card orders" do
      SimCardOrder.create(address_id: "123", quantity: 123)
      assert_requested(:post, "#{Telnyx.api_base}/v2/sim_card_orders")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
telnyx-3.0.5 test/telnyx/sim_card_order_test.rb
telnyx-3.0.4 test/telnyx/sim_card_order_test.rb
telnyx-3.0.3 test/telnyx/sim_card_order_test.rb
telnyx-3.0.2 test/telnyx/sim_card_order_test.rb
telnyx-3.0.0 test/telnyx/sim_card_order_test.rb