Sha256: 9fdb621af69ff91dbe77dd129e2ef2daef779f5d4148aa7583bfc29d42c0961e

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class CsvDownloadTest < Test::Unit::TestCase
    should "list csv_downloads" do
      csv_downloads = CsvDownload.list
      assert_requested :get, "#{Telnyx.api_base}/v2/phone_numbers/csv_downloads"
      assert_kind_of ListObject, csv_downloads
      assert csv_downloads.first.is_a?(CsvDownload) ||
             csv_downloads.first.is_a?(TelnyxObject),
             "Unexpected type: #{csv_downloads.first.class}"
    end

    should "retrieve a csv_download" do
      omit "ID req mismatch"
      csv = CsvDownload.retrieve("quasi")
      omit "ID req mismatch, 'keys"
      assert_requested :get, "#{Telnyx.api_base}/v2/phone_numbers/csv_downloads/quasi"
      assert csv.is_a?(CsvDownload) ||
             csv.is_a?(IPCsvDownload) ||
             csv.is_a?(CredentialCsvDownload),
             "Unexpected type: #{csv.class}"
    end

    should "create a csv_download" do
      omit "ID req mismatch"
      CsvDownload.create
      assert_requested :post, "#{Telnyx.api_base}/v2/phone_numbers/csv_downloads"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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