Sha256: 7bbb0c615a5921d751176a1535a74b3bc8343bcc0c798375779d00a2e869773c

Contents?: true

Size: 871 Bytes

Versions: 4

Compression:

Stored size: 871 Bytes

Contents

require 'spec_helper'

describe "Notification" do
  before(:all) do
    Twilio.connect('mysid', 'mytoken')
    @notification_sid = 'NO1fb7086ceb85caed2265f17d7bf7981c'
  end

  it "gets a list of notifications" do
    response, url = stub_get(:notifications, 'Notifications')
    
    Twilio::Notification.list.should == response
    WebMock.should have_requested(:get, url)
  end
  
  it "gets a specific notification" do
    response, url = stub_get(:notification, "Notifications/#{@notification_sid}")
      
    Twilio::Notification.get(@notification_sid).should == response
    WebMock.should have_requested(:get, url)
  end
  
  it "is deleted" do
    response, url = stub_delete(:notification, "Notifications/#{@notification_sid}")
    
    Twilio::Notification.delete(@notification_sid).should == response
    WebMock.should have_requested(:delete, url)
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
twilio-3.1.0 spec/twilio/notification_spec.rb
slayer-twilio-3.0.1 spec/twilio/notification_spec.rb
twilio-3.0.1 spec/twilio/notification_spec.rb
twilio-3.0.0 spec/twilio/notification_spec.rb