diff options
Diffstat (limited to 'activejob/test/integration')
-rw-r--r-- | activejob/test/integration/queuing_test.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/activejob/test/integration/queuing_test.rb b/activejob/test/integration/queuing_test.rb index 96794ffef3..d345092dee 100644 --- a/activejob/test/integration/queuing_test.rb +++ b/activejob/test/integration/queuing_test.rb @@ -11,7 +11,7 @@ class QueuingTest < ActiveSupport::TestCase end test 'should not run jobs queued on a non-listening queue' do - skip if adapter_is?(:inline) || adapter_is?(:sucker_punch) || adapter_is?(:que) + skip if adapter_is?(:inline, :sucker_punch, :que) old_queue = TestJob.queue_name begin @@ -55,4 +55,17 @@ class QueuingTest < ActiveSupport::TestCase skip end end + + test 'should supply a provider_job_id when available for immediate jobs' do + skip unless adapter_is?(:delayed_job, :sidekiq, :qu, :que) + test_job = TestJob.perform_later @id + refute test_job.provider_job_id.nil?, 'Provider job id should be set by provider' + end + + test 'should supply a provider_job_id when available for delayed jobs' do + skip unless adapter_is?(:delayed_job, :sidekiq, :que) + delayed_test_job = TestJob.set(wait: 1.minute).perform_later @id + refute delayed_test_job.provider_job_id.nil?, + 'Provider job id should by set for delayed jobs by provider' + end end |