Sha256: 4b3ec6a70e0490f3d8a4368cca859e1720b5c7bdbfdef74fa7cd94ec3e0d1f63
Contents?: true
Size: 651 Bytes
Versions: 10
Compression:
Stored size: 651 Bytes
Contents
require 'spec_helper' describe Notifiable::Concern do let(:user1) { FactoryGirl.create(:user_with_mock_token) } let(:invalid_token_user) { FactoryGirl.create(:user_with_invalid_mock_token) } let(:notification1) { FactoryGirl.create(:notification, :message => "First test message")} it "sends a single push notification" do user1.send_notification(notification1) Notifiable::NotificationStatus.count.should == 1 end it "sends zero notifications if the device is not valid" do invalid_token_user.send_notification(notification1) Notifiable::NotificationStatus.count.should == 0 end end
Version data entries
10 entries across 10 versions & 1 rubygems