Sha256: 9afb48021f257a243301fac528274315c196fdb3954d0f838c2b2d80dcd7613f

Contents?: true

Size: 979 Bytes

Versions: 11

Compression:

Stored size: 979 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": "submitted"
      }
      ]
    ))

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

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
twilio-ruby-5.50.0 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.49.0 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.48.0 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.47.0 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.46.1 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.46.0 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.45.1 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.45.0 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.44.0 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.43.0 spec/integration/events/v1/sink/sink_test_spec.rb
twilio-ruby-5.42.0 spec/integration/events/v1/sink/sink_test_spec.rb