diaspora/spec/models/jobs/notify_local_users_spec.rb
danielgrippi c9f069d000 Revert "add participant_users to conversations"
This reverts commit 655558cb95.

Revert "MS DG; for real this time?"

This reverts commit f85a047f6f.

Revert "MS DG; actually fix the bug"

This reverts commit cde12ec232.

Revert "fix small commenting email bug #oops"

This reverts commit a552fc80c0.

Revert "dont ban diasporahq  stuff"

This reverts commit 2c12b94e67.

Revert "Merge branch 'participants'"

This reverts commit 7417801886, reversing
changes made to abd211ba72.
2011-11-05 18:08:32 -07:00

20 lines
755 B
Ruby

# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
require 'spec_helper'
describe Jobs::NotifyLocalUsers do
describe '#perfom' do
it 'should call Notification.notify for each participant user' do
person = Factory :person
post = Factory :status_message
StatusMessage.should_receive(:find_by_id).with(post.id).and_return(post)
#User.should_receive(:where).and_return([alice, eve])
Notification.should_receive(:notify).with(instance_of(User), instance_of(StatusMessage), instance_of(Person)).twice
Jobs::NotifyLocalUsers.perform([alice.id, eve.id], post.class.to_s, post.id, person.id)
end
end
end