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