Sha256: 159b942f7603fd12028cb5ae84e6a29e448f5dbc48a6aa3d613084f053727a83

Contents?: true

Size: 699 Bytes

Versions: 14

Compression:

Stored size: 699 Bytes

Contents

require 'spec_helper'

class Announcement < StorageRoom::Entry
  key :text
end

describe StorageRoom::WebhookCall do
  before(:each) do
    @webhook_call = StorageRoom::WebhookCall.new
  end
  
  describe "#new_from_json_string" do
    it "should create object" do
      file = fixture_file('webhook_call.json')
      webhook_call = StorageRoom::Resource.new_from_json_string(file)
      
      webhook_call.should be_an_instance_of(StorageRoom::WebhookCall)        
      webhook_call[:@url].should_not be_present
      webhook_call[:@event].should == 'update'
      webhook_call.entry.should be_an_instance_of(Announcement)
      webhook_call.entry.text.should == 'WEBHOOK TEST'
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
storage_room-0.3.18 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.17 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.16 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.15 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.14 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.13 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.12 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.11 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.10 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.9 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.8 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.7 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.6 spec/storage_room/webhook_call_spec.rb
storage_room-0.3.5 spec/storage_room/webhook_call_spec.rb