make the socketing tests pending as we are not currently doing that
This commit is contained in:
parent
b27a8dd330
commit
44942036da
2 changed files with 11 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue