Sha256: 66e6343689b3daf572f1a1146eab3cc0ebf0ad8d6f50df74144b06327cf15547

Contents?: true

Size: 830 Bytes

Versions: 5

Compression:

Stored size: 830 Bytes

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class CallRecordingTest < Test::Unit::TestCase
    setup do
      @id = "d25f43b3-aea3-6a5d-7a1b-d83e5c100cce"
      @call_recording = CallRecording.retrieve @id
    end
    should "retrieve recording" do
      assert_requested(:get, "#{Telnyx.api_base}/v2/recordings/#{@id}")
      assert_kind_of Telnyx::CallRecording, @call_recording
    end

    should "list recordings" do
      recording = CallRecording.list
      assert_requested(:get, "#{Telnyx.api_base}/v2/recordings")
      assert_kind_of Telnyx::ListObject, recording
    end

    should "delete recording" do
      id = @call_recording.id.gsub(/\s+/, "+").freeze
      @call_recording.delete
      assert_requested(:delete, "#{Telnyx.api_base}/v2/recordings/#{id}")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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