spec/integration/conversations/v1/user_spec.rb in twilio-ruby-5.40.3 vs spec/integration/conversations/v1/user_spec.rb in twilio-ruby-5.40.4

- old
+ new

@@ -11,19 +11,21 @@ describe 'User' do it "can create" do @holodeck.mock(Twilio::Response.new(500, '')) expect { - @client.conversations.v1.users.create(identity: 'identity') + @client.conversations.v1.users.create(identity: 'identity', x_twilio_webhook_enabled: 'true') }.to raise_exception(Twilio::REST::TwilioError) values = {'Identity' => 'identity', } + headers = {'X-Twilio-Webhook-Enabled' => 'true', } expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', url: 'https://conversations.twilio.com/v1/Users', data: values, + headers: headers, ))).to eq(true) end it "receives create responses" do @holodeck.mock(Twilio::Response.new( @@ -52,17 +54,19 @@ it "can update" do @holodeck.mock(Twilio::Response.new(500, '')) expect { - @client.conversations.v1.users('USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update() + @client.conversations.v1.users('USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(x_twilio_webhook_enabled: 'true') }.to raise_exception(Twilio::REST::TwilioError) + headers = {'X-Twilio-Webhook-Enabled' => 'true', } expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', url: 'https://conversations.twilio.com/v1/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', + headers: headers, ))).to eq(true) end it "receives update responses" do @holodeck.mock(Twilio::Response.new( @@ -91,16 +95,18 @@ it "can delete" do @holodeck.mock(Twilio::Response.new(500, '')) expect { - @client.conversations.v1.users('USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete() + @client.conversations.v1.users('USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete(x_twilio_webhook_enabled: 'true') }.to raise_exception(Twilio::REST::TwilioError) + headers = {'X-Twilio-Webhook-Enabled' => 'true', } expect( @holodeck.has_request?(Holodeck::Request.new( method: 'delete', url: 'https://conversations.twilio.com/v1/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', + headers: headers, ))).to eq(true) end it "receives delete responses" do @holodeck.mock(Twilio::Response.new( \ No newline at end of file