Mock out more jobs that might make outside calls

This commit is contained in:
Sarah Mei 2011-09-05 14:31:00 -07:00
parent 96d920c9d6
commit 22b65bd3c1
3 changed files with 41 additions and 13 deletions

View file

@ -44,7 +44,7 @@ Cucumber::Rails::World.use_transactional_fixtures = false
require File.join(File.dirname(__FILE__), "database_cleaner_patches")
require File.join(File.dirname(__FILE__), "integration_sessions_controller")
require File.join(File.dirname(__FILE__), "mock_api_calls")
require File.join(File.dirname(__FILE__), "poor_mans_webmock")
require File.join(File.dirname(__FILE__), "..", "..", "spec", "support", "fake_redis")
require File.join(File.dirname(__FILE__), "..", "..", "spec", "helper_methods")

View file

@ -1,12 +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 PublishToHub < Base
@queue = :http_service
def self.perform(sender_public_url)
# don't publish when in cucumber
end
end
end

View file

@ -0,0 +1,40 @@
# 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 PublishToHub < Base
@queue = :http_service
def self.perform(sender_public_url)
# don't publish to pubsubhubbub in cucumber
end
end
class HttpMulti < Base
@queue = :http
def self.perform(user_id, enc_object_xml, person_ids, retry_count=0)
# don't federate in cucumber
end
end
class HttpPost < Base
@queue = :http
def self.perform(url, body, tries_remaining = NUM_TRIES)
# don't post to outside services in cucumber
end
end
class PostToService < Base
@queue = :http_service
def self.perform(service_id, post_id, url)
# don't post to services in cucumber
end
end
class UpdateServiceUsers < Base
@queue = :http_service
def self.perform(service_id)
# don't update services in cucumber
end
end
end