removed post to services since we are not using it

This commit is contained in:
zhitomirskiyi 2011-02-19 10:31:25 -08:00
parent 50cd06129a
commit 78b242b110
2 changed files with 0 additions and 32 deletions

View file

@ -1,17 +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 PostToServices < Base
@queue = :http_service
def self.perform_delegate(user_id, post_id, url)
user = User.find_by_id(user_id)
post = Post.find_by_id(post_id)
user.services.each do |s|
s.post(post, url)
end
end
end
end

View file

@ -1,15 +0,0 @@
require 'spec_helper'
describe Job::PostToServices do
it 'calls post to services from the given user with given post' do
user = alice
aspect = user.aspects.create(:name => "yeah")
post = user.post(:status_message, :message => 'foo', :to => aspect.id)
User.stub!(:find_by_id).with(user.id.to_s).and_return(user)
m = mock()
url = "foobar"
m.should_receive(:post).with(anything, url)
user.stub!(:services).and_return([m])
Job::PostToServices.perform(user.id.to_s, post.id.to_s, url)
end
end