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:
maxwell 2011-01-07 16:15:13 -08:00
parent 36d6864b40
commit 047217f50c

View file

@ -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