Sha256: ad66a6e1aa1f762a1737cf033d46b4a6fa3fcee0417655dabfaab66362a6f0b4
Contents?: true
Size: 683 Bytes
Versions: 15
Compression:
Stored size: 683 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")} before(:each) { FactoryGirl.create(:app) } it "sends a single push notification" do FactoryGirl.create(:app) user1.send_notification(notification) Notifiable::NotificationStatus.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::NotificationStatus.count.should == 0 end end
Version data entries
15 entries across 15 versions & 1 rubygems