test/job_test.rb in rocketjob-1.1.3 vs test/job_test.rb in rocketjob-1.2.0

- old
+ new

@@ -15,11 +15,12 @@ destroy_on_complete: false ) @job2 = Jobs::TestJob.new( description: "#{@description} 2", arguments: @arguments, - destroy_on_complete: false + destroy_on_complete: false, + priority: 52 ) end after do @job.destroy if @job && !@job.new_record? @@ -62,11 +63,11 @@ assert_equal @description, @job.description assert_equal false, @job.destroy_on_complete assert_nil @job.expires_at assert_equal @arguments, @job.arguments assert_equal 0, @job.percent_complete - assert_equal 50, @job.priority + assert_equal 51, @job.priority assert_equal 0, @job.failure_count assert_nil @job.run_at assert_nil @job.started_at assert_equal :queued, @job.state end @@ -266,9 +267,10 @@ end end describe '.requeue_dead_worker' do it 'requeue jobs from dead workers' do + assert_equal 52, @job2.priority worker_name = 'server:12345' @job.worker_name = worker_name @job.start! assert @job.running?