Sha256: 426b3a4a26300e361ea7fa2e147b6ed9b4fbb1591dc5c35e1db9941489caf71c

Contents?: true

Size: 1.05 KB

Versions: 6

Compression:

Stored size: 1.05 KB

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class FaxApplicationTest < Test::Unit::TestCase
    should "fetch index" do
      fax_applications = FaxApplication.list
      assert_requested :get, "#{Telnyx.api_base}/v2/fax_applications"
      assert_kind_of ListObject, fax_applications
      assert_kind_of FaxApplication, fax_applications.first
    end

    should "create" do
      fax_application = FaxApplication.create application_name: "foo", webhook_event_url: "https://foo.bar.com"
      assert_requested :post, "#{Telnyx.api_base}/v2/fax_applications"
      assert_kind_of FaxApplication, fax_application
    end

    should "retrieve" do
      fax_application = FaxApplication.retrieve "foo"
      assert_requested :get, "#{Telnyx.api_base}/v2/fax_applications/foo"
      assert_kind_of FaxApplication, fax_application
    end

    should "delete" do
      fax_application = FaxApplication.retrieve "foo"
      fax_application.delete
      assert_requested :delete, "#{Telnyx.api_base}/v2/fax_applications/foo"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
telnyx-2.9.0 test/telnyx/fax_application_test.rb
telnyx-2.8.0 test/telnyx/fax_application_test.rb
telnyx-2.7.0 test/telnyx/fax_application_test.rb
telnyx-2.6.0 test/telnyx/fax_application_test.rb
telnyx-2.5.0 test/telnyx/fax_application_test.rb
telnyx-2.4.0 test/telnyx/fax_application_test.rb