Sha256: 3f36807afaa11fb6193f8d51fc51bafaa9992ceebf780b0d6e7e579aab93d841

Contents?: true

Size: 1.06 KB

Versions: 17

Compression:

Stored size: 1.06 KB

Contents

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

require 'spec_helper.rb'

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

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

    values = {'TestId' => 'test_id', }
    expect(
    @holodeck.has_request?(Holodeck::Request.new(
        method: 'post',
        url: 'https://events.twilio.com/v1/Sinks/DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Validate',
        data: values,
    ))).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_validate.create(test_id: 'test_id')

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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
twilio-ruby-5.50.0 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.49.0 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.48.0 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.47.0 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.46.1 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.46.0 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.45.1 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.45.0 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.44.0 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.43.0 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.42.0 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.41.0 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.40.4 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.40.3 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.40.2 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.40.1 spec/integration/events/v1/sink/sink_validate_spec.rb
twilio-ruby-5.40.0 spec/integration/events/v1/sink/sink_validate_spec.rb