Sha256: 6867d2976fbe17ff48b5ff74762294fa3155a426b3d60b5fc37e542eeb46203f

Contents?: true

Size: 1.1 KB

Versions: 5

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class VerifiedCallsDisplayProfilesTest < Test::Unit::TestCase
    setup do
      @profiles = VerifiedCallsDisplayProfile.list
      @id = @profiles.first.id.freeze
    end

    should "be listable" do
      assert_requested :get, "#{Telnyx.api_base}/v2/verified_calls_display_profiles"
      assert_kind_of ListObject, @profiles
      assert_kind_of TelnyxObject, @profiles.first
      assert @profiles[:data].is_a?(Array)
    end

    should "be retrievable" do
      profile = VerifiedCallsDisplayProfile.retrieve(@id)
      assert_requested :get, "#{Telnyx.api_base}/v2/verified_calls_display_profiles/#{@id}"
      assert profile.is_a?(Telnyx::VerifiedCallsDisplayProfile)
    end

    should "create verified_calls_display_profiles verification_request" do
      omit "ID req mismatch"
      profile = VerifiedCallsDisplayProfile.retrieve(@id)
      id = profile.id.freeze
      profile.verification_request
      assert_requested :post, "#{Telnyx.api_base}/v2/verified_calls_display_profiles/#{id}/verification_request"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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