1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/test/cases/adapter_test.rb
2014-05-18 20:59:12 +00:00

31 lines
912 B
Ruby

require 'helper'
class AdapterTest < ActiveSupport::TestCase
def setup
@old_adapter = ActiveJob::Base.queue_adapter
end
test 'should load inline adapter' do
ActiveJob::Base.adapter = :inline
assert_equal ActiveJob::QueueAdapters::InlineAdapter, ActiveJob::Base.queue_adapter
end
test 'should load resque adapter' do
ActiveJob::Base.adapter = :resque
assert_equal ActiveJob::QueueAdapters::ResqueAdapter, ActiveJob::Base.queue_adapter
end
test 'should load sidekiq adapter' do
ActiveJob::Base.adapter = :sidekiq
assert_equal ActiveJob::QueueAdapters::SidekiqAdapter, ActiveJob::Base.queue_adapter
end
test 'should load sucker punch adapter' do
ActiveJob::Base.adapter = :sucker_punch
assert_equal ActiveJob::QueueAdapters::SuckerPunchAdapter, ActiveJob::Base.queue_adapter
end
def teardown
ActiveJob::Base.queue_adapter = @old_adapter
end
end