Sha256: 772aab2dab56c717f1713179c5c7aae1f0c99b46089bcefb3ee9044ced50b0fc

Contents?: true

Size: 818 Bytes

Versions: 2

Compression:

Stored size: 818 Bytes

Contents

require 'spec_helper'

describe Restcomm::REST::SMS::Message do

  before do
    client = double("Client")
    allow(client).to receive(:post) do 
      {'sid' => 'qwerty' } 
    end

    allow(client).to receive(:get) do 
      {'sid' => 'qwerty', 'sms_message' => [] } 
    end
    
    allow(client).to receive(:delete) do 
      {'sid' => 'qwerty' } 
    end

    @message = Restcomm::REST::SMS::Message.new('someUri',client)
  end
 
  it 'should warn of deprecation of SMS Message Update' do
    expect(@message).to receive(:warn)
    @message.update
  end

  it 'should warn of deprecation of SMS Message Refresh' do
    expect(@message).to receive(:warn)
    @message.refresh
  end

  it 'should warn of deprecation of SMS Message Delete' do
    expect(@message).to receive(:warn)
    @message.delete
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
restcomm-ruby-1.2.1 spec/rest/sms/message_spec.rb
restcomm-ruby-1.2.0 spec/rest/sms/message_spec.rb