Sha256: d8a53fa93799f8311ba09df844b79b93db41abea97d838db63adccb447f78a1b

Contents?: true

Size: 975 Bytes

Versions: 6

Compression:

Stored size: 975 Bytes

Contents

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

require 'spec_helper.rb'

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

    expect {
      @client.events.v1.sinks('DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
                       .sink_test.create()
    }.to raise_exception(Twilio::REST::TwilioError)

    expect(
    @holodeck.has_request?(Holodeck::Request.new(
        method: 'post',
        url: 'https://events.twilio.com/v1/Sinks/DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Test',
    ))).to eq(true)
  end

  it "receives create responses" do
    @holodeck.mock(Twilio::Response.new(
        201,
      %q[
      {
          "result": "valid"
      }
      ]
    ))

    actual = @client.events.v1.sinks('DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
                              .sink_test.create()

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
twilio-ruby-5.41.0 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.40.4 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.40.3 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.40.2 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.40.1 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.40.0 spec/integration/events/v1/sink/sink_test_spec.rb