diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/adapters/que.rb | 2 | ||||
-rw-r--r-- | test/cases/adapter_test.rb | 26 |
2 files changed, 20 insertions, 8 deletions
diff --git a/test/adapters/que.rb b/test/adapters/que.rb new file mode 100644 index 0000000000..640061bf54 --- /dev/null +++ b/test/adapters/que.rb @@ -0,0 +1,2 @@ +ActiveJob::Base.queue_adapter = :que +Que.mode = :sync diff --git a/test/cases/adapter_test.rb b/test/cases/adapter_test.rb index 05efdc33e9..e922750ab4 100644 --- a/test/cases/adapter_test.rb +++ b/test/cases/adapter_test.rb @@ -10,26 +10,36 @@ class AdapterTest < ActiveSupport::TestCase assert_equal ActiveJob::QueueAdapters::InlineAdapter, ActiveJob::Base.queue_adapter end - test 'should load resque adapter' do + test 'should load Delayed Job adapter' do + ActiveJob::Base.queue_adapter = :delayed_job + assert_equal ActiveJob::QueueAdapters::DelayedJobAdapter, ActiveJob::Base.queue_adapter + end + + test 'should load Que adapter' do + ActiveJob::Base.queue_adapter = :que + assert_equal ActiveJob::QueueAdapters::QueAdapter, ActiveJob::Base.queue_adapter + end + + test 'should load Queue Classic adapter' do + ActiveJob::Base.queue_adapter = :queue_classic + assert_equal ActiveJob::QueueAdapters::QueueClassicAdapter, ActiveJob::Base.queue_adapter + end + + test 'should load Resque adapter' do ActiveJob::Base.queue_adapter = :resque assert_equal ActiveJob::QueueAdapters::ResqueAdapter, ActiveJob::Base.queue_adapter end - test 'should load sidekiq adapter' do + test 'should load Sidekiq adapter' do ActiveJob::Base.queue_adapter = :sidekiq assert_equal ActiveJob::QueueAdapters::SidekiqAdapter, ActiveJob::Base.queue_adapter end - test 'should load sucker punch adapter' do + test 'should load Sucker Punch adapter' do ActiveJob::Base.queue_adapter = :sucker_punch assert_equal ActiveJob::QueueAdapters::SuckerPunchAdapter, ActiveJob::Base.queue_adapter end - test 'should load delayed_job adapter' do - ActiveJob::Base.queue_adapter = :delayed_job - assert_equal ActiveJob::QueueAdapters::DelayedJobAdapter, ActiveJob::Base.queue_adapter - end - def teardown ActiveJob::Base.queue_adapter = @old_adapter end |