## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / require 'spec_helper.rb' describe 'InProgress' do it "can read" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) expect { @client.conversations.v1.conversations \ .in_progress.list() }.to raise_exception(Twilio::REST::TwilioException) values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'get', url: 'https://conversations.twilio.com/v1/Conversations/InProgress', ))).to eq(true) end it "receives read_full responses" do @holodeck.mock(Twilio::TwilioResponse.new( 200, %q[ { "conversations": [ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2015-05-12T21:08:50Z", "duration": 60, "end_time": "2015-05-12T21:09:50Z", "links": { "participants": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants" }, "sid": "CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "start_time": "2015-05-12T21:08:50Z", "status": "completed", "url": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ], "meta": { "first_page_url": "https://conversations.twilio.com/v1/Conversations/InProgress?PageSize=50&Page=0", "key": "conversations", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://conversations.twilio.com/v1/Conversations/InProgress?PageSize=50&Page=0" } } ] )) actual = @client.conversations.v1.conversations \ .in_progress.list() expect(actual).to_not eq(nil) end it "receives read_empty responses" do @holodeck.mock(Twilio::TwilioResponse.new( 200, %q[ { "conversations": [], "meta": { "first_page_url": "https://conversations.twilio.com/v1/Conversations/InProgress?PageSize=50&Page=0", "key": "conversations", "next_page_url": null, "page": 0, "page_size": 50, "previous_page_url": null, "url": "https://conversations.twilio.com/v1/Conversations/InProgress?PageSize=50&Page=0" } } ] )) actual = @client.conversations.v1.conversations \ .in_progress.list() expect(actual).to_not eq(nil) end end