Sha256: 9a6d2599dc2d23f1a760598e13ec4a1cfa35fca36820a2d9029b7dbe08aaefcf

Contents?: true

Size: 1.66 KB

Versions: 9

Compression:

Stored size: 1.66 KB

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class CallControlApplicationTest < Test::Unit::TestCase
    should "list call_control_application" do
      call_control_application = CallControlApplication.list
      assert_requested :get, "#{Telnyx.api_base}/v2/call_control_applications"
      assert_kind_of ListObject, call_control_application
      assert_kind_of CallControlApplication, call_control_application.first
    end

    should "create call_control_application" do
      CallControlApplication.create webhook_event_url: "example.com", connection_name: "telnyx", application_name: "telnyx"
      assert_requested :post, "#{Telnyx.api_base}/v2/call_control_applications"
    end

    should "retrieve call_control_application" do
      call_control_application = CallControlApplication.retrieve("id")
      assert_requested :get, "#{Telnyx.api_base}/v2/call_control_applications/id"
      assert_kind_of CallControlApplication, call_control_application
    end

    should "delete call_control_application" do
      call_control_application = CallControlApplication.retrieve("id")

      call_control_application.delete
      assert_requested :delete, "#{Telnyx.api_base}/v2/call_control_applications/id"
    end

    should "update call_control_application" do
      call_control_application = CallControlApplication.retrieve("id")

      call_control_application.webhook_event_url = "example.com"
      call_control_application.connection_name = "telnyx"
      call_control_application.application_name = "telnyx"
      call_control_application.save
      assert_requested :patch, "#{Telnyx.api_base}/v2/call_control_applications/id"
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
telnyx-2.9.0 test/telnyx/call_control_application_test.rb
telnyx-2.8.0 test/telnyx/call_control_application_test.rb
telnyx-2.7.0 test/telnyx/call_control_application_test.rb
telnyx-2.6.0 test/telnyx/call_control_application_test.rb
telnyx-2.5.0 test/telnyx/call_control_application_test.rb
telnyx-2.4.0 test/telnyx/call_control_application_test.rb
telnyx-2.3.0 test/telnyx/call_control_application_test.rb
telnyx-2.2.0 test/telnyx/call_control_application_test.rb
telnyx-0.1.0 test/telnyx/call_control_application_test.rb