Sha256: e9cfc8c42a2bb40c326d6d123e75fb8e106711cc53d7817cfd7c3945f7a1e0f3
Contents?: true
Size: 616 Bytes
Versions: 7
Compression:
Stored size: 616 Bytes
Contents
require 'spec_helper' describe Notifiable::Concern do let(:user1) { FactoryGirl.create(:user_with_mock_token) } let(:notification) { Notifiable::Notification.new(:message => "Test message")} it "sends a single push notification" do user1.send_notification(notification) Notifiable::NotificationDeviceToken.count.should == 1 end it "sends zero notifications if the device is not valid" do user = FactoryGirl.build(:user_with_invalid_mock_token) user.send_notification(notification) Notifiable::NotificationDeviceToken.count.should == 0 end end
Version data entries
7 entries across 7 versions & 1 rubygems