diff --git a/app/models/jobs/receive_local.rb b/app/models/jobs/receive_local.rb deleted file mode 100644 index bc70edca5..000000000 --- a/app/models/jobs/receive_local.rb +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2010, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. - - -module Job - class ReceiveLocal < Base - require File.join(Rails.root, 'lib/postzord/receiver') - - @queue = :receive_local - def self.perform_delegate(user_id, person_id, object_type, object_id) - user = User.find(user_id) - person = Person.find(person_id) - object = object_type.constantize.where(:id => object_id).first - - z = Postzord::Receiver.new(user, :person => person, :object => object) - z.receive_object - end - end -end diff --git a/spec/models/jobs/receive_local_spec.rb b/spec/models/jobs/receive_local_spec.rb deleted file mode 100644 index 8220688e4..000000000 --- a/spec/models/jobs/receive_local_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'spec_helper' - -describe Job::ReceiveLocal do - before do - @user1 = alice - @person1 = @user1.person - @user2 = eve - @person2 = @user2.person - @status = Factory(:status_message) - @status_type = @status.class.to_s - - User.stub(:find){ |id| - if id == @user1.id - @user1 - else - nil - end - } - - Person.stub(:find){ |id| - if id == @person2.id - @person2 - else - nil - end - } - - StatusMessage.stub(:find){ |id| - if id == @status.id - @status - else - nil - end - } - end - - it 'calls receive_object' do - m = mock() - m.should_receive(:receive_object) - Postzord::Receiver.should_receive(:new).and_return(m) - Job::ReceiveLocal.perform(@user1.id, @person2.id, @status_type, @status.id) - end -end