Fix spec that depended on 0 lock_version being unsupported

This commit is contained in:
Douwe Maan 2018-12-27 17:11:21 +01:00
parent 8237034530
commit b112df6acf
No known key found for this signature in database
GPG Key ID: 5976703F65143D36
1 changed files with 3 additions and 1 deletions

View File

@ -244,7 +244,9 @@ module Ci
context 'when first build is stalled' do
before do
pending_job.update(lock_version: 0)
allow_any_instance_of(Ci::RegisterJobService).to receive(:assign_runner!).and_call_original
allow_any_instance_of(Ci::RegisterJobService).to receive(:assign_runner!)
.with(pending_job, anything).and_raise(ActiveRecord::StaleObjectError)
end
subject { described_class.new(specific_runner).execute }