test/plugins/job/throttle_test.rb in rocketjob-3.3.1 vs test/plugins/job/throttle_test.rb in rocketjob-3.3.2

- old
+ new

@@ -84,26 +84,26 @@ it 'return the job when others are queued, paused, failed, or complete' do @job = ThrottleJob.create! ThrottleJob.create!(state: :failed) ThrottleJob.create!(state: :complete) ThrottleJob.create!(state: :paused) - assert job = RocketJob::Job.rocket_job_next_job(@worker_name), -> {ThrottleJob.all.to_a.ai} - assert_equal @job.id, job.id, -> {ThrottleJob.all.to_a.ai} + assert job = RocketJob::Job.rocket_job_next_job(@worker_name), -> { ThrottleJob.all.to_a.ai } + assert_equal @job.id, job.id, -> { ThrottleJob.all.to_a.ai } end it 'return nil when other jobs are running' do ThrottleJob.create! @job = ThrottleJob.new @job.start! - assert_nil RocketJob::Job.rocket_job_next_job(@worker_name), -> {ThrottleJob.all.to_a.ai} + assert_nil RocketJob::Job.rocket_job_next_job(@worker_name), -> { ThrottleJob.all.to_a.ai } end it 'add job to filter when other jobs are running' do ThrottleJob.create! @job = ThrottleJob.new @job.start! filter = {} - assert_nil RocketJob::Job.rocket_job_next_job(@worker_name, filter), -> {ThrottleJob.all.to_a.ai} + assert_nil RocketJob::Job.rocket_job_next_job(@worker_name, filter), -> { ThrottleJob.all.to_a.ai } assert_equal 1, filter.size end end end