fixed test to have postzord only socket on comments.... need to figure out a better way to abstract this exception...
This commit is contained in:
parent
36d6864b40
commit
047217f50c
1 changed files with 6 additions and 3 deletions
|
|
@ -75,9 +75,12 @@ describe Postzord::Dispatch do
|
|||
@zord.post
|
||||
end
|
||||
|
||||
it 'calls socket_to_users with the local users' do
|
||||
@zord.should_receive(:socket_to_users).with([@local_user])
|
||||
@zord.post
|
||||
it 'calls socket_to_users with the local users if the object is a comment' do
|
||||
comment = @local_user.comment "yo", :on => Factory(:status_message)
|
||||
comment.should_receive(:subscribers).and_return([@local_user])
|
||||
mailman = Postzord::Dispatch.new(@user, comment)
|
||||
mailman.should_receive(:socket_to_users)
|
||||
mailman.post
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue