Sha256: 6464281aa3e1d7cf4e0821909453ad5d3976ad83007c17872adbe8ceb2da8364

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

##
# This code was generated by
# \ / _    _  _|   _  _
#  | (_)\/(_)(_|\/| |(/_  v1.0.0
#       /       /
#
# frozen_string_literal: true

require 'spec_helper.rb'

describe 'CurrentCall' do
  it "can fetch" do
    @holodeck.mock(Twilio::Response.new(500, ''))

    expect {
      @client.preview.trusted_comms.current_calls().fetch()
    }.to raise_exception(Twilio::REST::TwilioError)

    values = {}
    expect(
    @holodeck.has_request?(Holodeck::Request.new(
        method: 'get',
        url: 'https://preview.twilio.com/TrustedComms/CurrentCall',
    ))).to eq(true)
  end

  it "receives read_found responses" do
    @holodeck.mock(Twilio::Response.new(
        200,
      %q[
      {
          "sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "from": "+15000000000",
          "to": "+573000000000",
          "reason": "Hello Jhon, your appointment has been confirmed.",
          "created_at": "2019-05-01T20:00:00Z",
          "url": "https://preview.twilio.com/TrustedComms/CurrentCall"
      }
      ]
    ))

    actual = @client.preview.trusted_comms.current_calls().fetch()

    expect(actual).to_not eq(nil)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twilio-ruby-5.23.1 spec/integration/preview/trusted_comms/current_call_spec.rb