Sha256: cce678ed6821ca76d26c22f144e7324b89e967bdb7621d319fc904756f7df324

Contents?: true

Size: 1.91 KB

Versions: 9

Compression:

Stored size: 1.91 KB

Contents

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

require 'spec_helper.rb'

describe 'Device' do
  it "can fetch" do
    @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
    
    expect {
      @client.preview.wireless.devices("DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
    }.to raise_exception(Twilio::REST::TwilioException)
    
    values = {}
    expect(
    @holodeck.has_request?(Holodeck::Request.new(
        method: 'get',
        url: 'https://preview.twilio.com/wireless/Devices/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
    ))).to eq(true)
  end

  it "can read" do
    @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
    
    expect {
      @client.preview.wireless.devices.list()
    }.to raise_exception(Twilio::REST::TwilioException)
    
    values = {}
    expect(
    @holodeck.has_request?(Holodeck::Request.new(
        method: 'get',
        url: 'https://preview.twilio.com/wireless/Devices',
    ))).to eq(true)
  end

  it "can create" do
    @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
    
    expect {
      @client.preview.wireless.devices.create(rate_plan: "rate_plan")
    }.to raise_exception(Twilio::REST::TwilioException)
    
    values = {
        'RatePlan' => "rate_plan",
    }
    expect(
    @holodeck.has_request?(Holodeck::Request.new(
        method: 'post',
        url: 'https://preview.twilio.com/wireless/Devices',
        data: values,
    ))).to eq(true)
  end

  it "can update" do
    @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
    
    expect {
      @client.preview.wireless.devices("DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
    }.to raise_exception(Twilio::REST::TwilioException)
    
    values = {}
    expect(
    @holodeck.has_request?(Holodeck::Request.new(
        method: 'post',
        url: 'https://preview.twilio.com/wireless/Devices/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
    ))).to eq(true)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
twilio-ruby-5.0.0.rc18 spec/integration/preview/wireless/device_spec.rb
twilio-ruby-5.0.0.rc17 spec/integration/preview/wireless/device_spec.rb
twilio-ruby-5.0.0.rc16 spec/integration/preview/wireless/device_spec.rb
twilio-ruby-5.0.0.rc15 spec/integration/preview/wireless/device_spec.rb
twilio-ruby-5.0.0.rc14 spec/integration/preview/wireless/device_spec.rb
twilio-ruby-5.0.0.rc13 spec/integration/preview/wireless/device_spec.rb
twilio-ruby-5.0.0.rc12 spec/integration/preview/wireless/device_spec.rb
twilio-ruby-5.0.0.rc11 spec/integration/preview/wireless/device_spec.rb
twilio-ruby-5.0.0.rc10 spec/integration/preview/wireless/device_spec.rb