Sha256: 331a1f7cf33a79176b04432788fa10952e9625a1385361c1d2b025bffce59753

Contents?: true

Size: 1.38 KB

Versions: 8

Compression:

Stored size: 1.38 KB

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class AlphanumericSenderIdTest < Test::Unit::TestCase
    setup do
      omit "alphanumeric ids mock spec removed"
    end

    should "be listable" do
      alphanumeric_sender_ids = Telnyx::AlphanumericSenderId.list
      assert_requested :get, "#{Telnyx.api_base}/v2/alphanumeric_sender_ids"
      assert_kind_of Array, alphanumeric_sender_ids.data
      assert_kind_of Telnyx::AlphanumericSenderId, alphanumeric_sender_ids.first
    end

    should "be retrievable" do
      alphanumeric_sender_id = Telnyx::AlphanumericSenderId.retrieve("123")
      assert_requested :get, "#{Telnyx.api_base}/v2/alphanumeric_sender_ids/123"
      assert_kind_of Telnyx::AlphanumericSenderId, alphanumeric_sender_id
    end

    should "be creatable" do
      alphanumeric_sender_id = Telnyx::AlphanumericSenderId.create(sender_id: "TelnyxID")
      assert_requested :post, "#{Telnyx.api_base}/v2/alphanumeric_sender_ids"
      assert_kind_of Telnyx::AlphanumericSenderId, alphanumeric_sender_id
    end

    should "be deletable" do
      alphanumeric_sender_id = Telnyx::AlphanumericSenderId.retrieve("123")
      alphanumeric_sender_id = alphanumeric_sender_id.delete
      assert_requested :delete, "#{Telnyx.api_base}/v2/alphanumeric_sender_ids/123"
      assert alphanumeric_sender_id.is_a?(Telnyx::AlphanumericSenderId)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
telnyx-3.0.5 test/telnyx/alphanumeric_sender_id_test.rb
telnyx-3.0.4 test/telnyx/alphanumeric_sender_id_test.rb
telnyx-3.0.3 test/telnyx/alphanumeric_sender_id_test.rb
telnyx-3.0.2 test/telnyx/alphanumeric_sender_id_test.rb
telnyx-3.0.0 test/telnyx/alphanumeric_sender_id_test.rb
telnyx-2.9.0 test/telnyx/alphanumeric_sender_id_test.rb
telnyx-2.8.0 test/telnyx/alphanumeric_sender_id_test.rb
telnyx-2.7.0 test/telnyx/alphanumeric_sender_id_test.rb