Sha256: 51fb62c25add339d3af7a25356ed6ea4ef4b668cf44debd78c5c6b47843283f1

Contents?: true

Size: 1.3 KB

Versions: 5

Compression:

Stored size: 1.3 KB

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class PrivateWirelessGatewayTest < Test::Unit::TestCase
    setup do
      @id = "d25f43b3-aea3-6a5d-7a1b-d83e5c100cce"
      @private_wireless_gateway = PrivateWirelessGateway.retrieve @id
    end
    should "retrieve private_wireless_gateway" do
      assert_requested(:get, "#{Telnyx.api_base}/v2/private_wireless_gateways/#{@id}")
      assert_kind_of Telnyx::PrivateWirelessGateway, @private_wireless_gateway
    end

    should "list private_wireless_gateways" do
      private_wireless_gateway = PrivateWirelessGateway.list
      assert_requested(:get, "#{Telnyx.api_base}/v2/private_wireless_gateways")
      assert_kind_of Telnyx::ListObject, private_wireless_gateway
    end

    should "delete private_wireless_gateway" do
      id = @private_wireless_gateway.id.gsub(/\s+/, "+").freeze
      @private_wireless_gateway.delete
      assert_requested(:delete, "#{Telnyx.api_base}/v2/private_wireless_gateways/#{id}")
    end
    should "be creatable" do
      PrivateWirelessGateway.create(name: "internet gateway", network_id: "471b9dec-6aa5-41e5-ad4e-634ba1dcb5ce", region: { code: "example code", name: "region", record_type: "region" })
      assert_requested(:post, "#{Telnyx.api_base}/v2/private_wireless_gateways")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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