Sha256: a986228171096871a1d62e2aab81e749add58df7e1f312219a6797e7cb6495fc

Contents?: true

Size: 934 Bytes

Versions: 5

Compression:

Stored size: 934 Bytes

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class CallTest < Test::Unit::TestCase
    should "gether" do
      call = Call.retrieve("13")
      id = call.call_control_id.gsub(/\s+/, "+").freeze
      call.gather
      assert_requested :post, "#{Telnyx.api_base}/v2/calls/#{id}/actions/gather"
      assert_kind_of Call, call
    end
    should "streaming_stop" do
      call = Call.retrieve("13")
      id = call.call_control_id.gsub(/\s+/, "+").freeze
      call.streaming_stop
      assert_requested :post, "#{Telnyx.api_base}/v2/calls/#{id}/actions/streaming_stop"
      assert_kind_of Call, call
    end
    should "streaming_start" do
      call = Call.retrieve("13")
      id = call.call_control_id.gsub(/\s+/, "+").freeze
      call.streaming_start
      assert_requested :post, "#{Telnyx.api_base}/v2/calls/#{id}/actions/streaming_start"
      assert_kind_of Call, call
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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