Sha256: 6fc1a5830be25b2fc019edc58b9e7dcd91fd46871c0d0286157d81a9d42343a9
Contents?: true
Size: 770 Bytes
Versions: 12
Compression:
Stored size: 770 Bytes
Contents
require 'spec_helper' describe DeviceCloud::PushNotification::EventNotification do describe "#handle!" do let(:data) do { 'id' => 1234, 'device_id' => 'm:1392301029', 'type' => 'some type', 'queued_dt' => '2013-06-24T14:52:55.421Z', 'value' => {'this' => 'is a value'} } end let(:file_data) { OpenStruct.new(data: data, full_path: '/foo/bar/baz.json') } subject { DeviceCloud::PushNotification::EventNotification.new file_data } it "should call the DeviceCloud.event_notification_handler with self" do handled_event = nil DeviceCloud.event_notification_handler = ->(event) { handled_event = event } subject.handle! expect(handled_event).to eq subject end end end
Version data entries
12 entries across 12 versions & 1 rubygems