From 44942036da7f0a4c32c4c537b2b26a3b4839a096 Mon Sep 17 00:00:00 2001
From: Maxwell Salzberg <maxwell@joindiaspora.com>
Date: Thu, 29 Sep 2011 13:33:44 -0700
Subject: [PATCH] make the socketing tests pending as we are not currently
 doing that

---
 app/models/post_visibility.rb                  | 8 ++++----
 spec/lib/postzord/receiver/local_batch_spec.rb | 9 +++++++--
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/app/models/post_visibility.rb b/app/models/post_visibility.rb
index b199a64d96..d2f3c09645 100644
--- a/app/models/post_visibility.rb
+++ b/app/models/post_visibility.rb
@@ -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)
diff --git a/spec/lib/postzord/receiver/local_batch_spec.rb b/spec/lib/postzord/receiver/local_batch_spec.rb
index 991826278d..5391fad6bf 100644
--- a/spec/lib/postzord/receiver/local_batch_spec.rb
+++ b/spec/lib/postzord/receiver/local_batch_spec.rb
@@ -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)
-- 
GitLab