test/plugins/job/worker_test.rb in rocketjob-3.0.0.rc2 vs test/plugins/job/worker_test.rb in rocketjob-3.0.0.rc3

- old
+ new

@@ -46,11 +46,11 @@ @job = QuietJob.new @worker = RocketJob::Server.new(name: 'worker:123') end it 'return nil when no jobs available' do - assert_equal nil, RocketJob::Job.rocket_job_next_job(@worker.name) + assert_nil RocketJob::Job.rocket_job_next_job(@worker.name) end it 'return the first job' do @job.save! assert job = RocketJob::Job.rocket_job_next_job(@worker.name), 'Failed to find job' @@ -58,11 +58,11 @@ end it 'Ignore future dated jobs' do @job.run_at = Time.now + 1.hour @job.save! - assert_equal nil, RocketJob::Job.rocket_job_next_job(@worker.name) + assert_nil RocketJob::Job.rocket_job_next_job(@worker.name) end it 'Process future dated jobs when time is now' do @job.run_at = Time.now @job.save! @@ -72,10 +72,10 @@ it 'Skip expired jobs' do count = RocketJob::Job.count @job.expires_at = Time.now - 100 @job.save! - assert_equal nil, RocketJob::Job.rocket_job_next_job(@worker.name) + assert_nil RocketJob::Job.rocket_job_next_job(@worker.name) assert_equal count, RocketJob::Job.count end end describe '#perform_now' do