Sha256: de4d3f04adae5a31e5863b6e9d4f1019b454532f0260dac5d6c25816e94dfa4c

Contents?: true

Size: 1.07 KB

Versions: 28

Compression:

Stored size: 1.07 KB

Contents

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

require 'spec_helper.rb'

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

    expect {
      @client.studio.v2.flow_validate.update(friendly_name: 'friendly_name', status: 'draft', definition: {})
    }.to raise_exception(Twilio::REST::TwilioError)

    values = {
        'FriendlyName' => 'friendly_name',
        'Status' => 'draft',
        'Definition' => Twilio.serialize_object({}),
    }
    expect(
    @holodeck.has_request?(Holodeck::Request.new(
        method: 'post',
        url: 'https://studio.twilio.com/v2/Flows/Validate',
        data: values,
    ))).to eq(true)
  end

  it "receives update responses" do
    @holodeck.mock(Twilio::Response.new(
        200,
      %q[
      {
          "valid": true
      }
      ]
    ))

    actual = @client.studio.v2.flow_validate.update(friendly_name: 'friendly_name', status: 'draft', definition: {})

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

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
twilio-ruby-5.50.0 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.49.0 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.48.0 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.47.0 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.46.1 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.46.0 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.45.1 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.45.0 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.44.0 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.43.0 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.42.0 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.41.0 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.40.4 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.40.3 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.40.2 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.40.1 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.40.0 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.39.3 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.39.2 spec/integration/studio/v2/flow_validate_spec.rb
twilio-ruby-5.39.1 spec/integration/studio/v2/flow_validate_spec.rb