Skip to content
Extraits de code Groupes Projets
Valider 44942036 rédigé par Maxwell Salzberg's avatar Maxwell Salzberg
Parcourir les fichiers

make the socketing tests pending as we are not currently doing that

parent b27a8dd3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -12,13 +12,13 @@ class PostVisibility < ActiveRecord::Base
# @param contacts [Array<Contact>] Recipients
# @param post [Post]
# @return [void]
def self.batch_import(contacts_ids, post)
def self.batch_import(contact_ids, post)
if postgres?
contacts_ids.each do |contact_id|
PostVisibility.find_or_create_by_contact_id_and_post_id(contact.id, post.id)
contacs_ids.each do |contact_id|
PostVisibility.find_or_create_by_contact_id_and_post_id(contact_id, post.id)
end
else
new_post_visibilities_data = contacts_ids.map do |contact_id|
new_post_visibilities_data = contact_ids.map do |contact_id|
[contact_id, post.id]
end
PostVisibility.import([:contact_id, :post_id], new_post_visibilities_data)
......
......@@ -24,6 +24,7 @@ describe Postzord::Receiver::LocalBatch do
end
it 'sockets to users' do
pending 'not currently socketing'
receiver.should_receive(:socket_to_users)
receiver.perform!
end
......@@ -94,12 +95,16 @@ describe Postzord::Receiver::LocalBatch do
@object = Factory(:comment, :author => bob.person, :post => sm)
end
it 'calls socket_to_users and notify_users' do
receiver.should_receive(:socket_to_users)
it 'calls notify_users' do
receiver.should_receive(:notify_users)
receiver.perform!
end
it 'calls socket_to_users' do
pending 'not currently socketing'
receiver.should_receive(:socket_to_users)
receiver.perform!
end
it 'does not call create_visibilities and notify_mentioned_users' do
receiver.should_not_receive(:notify_mentioned_users)
receiver.should_not_receive(:create_post_visibilities)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter