Use twice over .exactly(2).times

parent 9a79707e
......@@ -28,7 +28,7 @@ describe Geo::RepositoryBackfillService, services: true do
end
it 'releases leases' do
expect(Gitlab::ExclusiveLease).to receive(:cancel).exactly(2).and_call_original
expect(Gitlab::ExclusiveLease).to receive(:cancel).twice.and_call_original
subject.execute
end
......
......@@ -9,7 +9,7 @@ describe Geo::GeoBackfillWorker, services: true do
describe '#perform' do
it 'performs GeoSingleRepositoryBackfillWorker for each project' do
expect(GeoSingleRepositoryBackfillWorker).to receive(:new).exactly(2).and_call_original
expect(GeoSingleRepositoryBackfillWorker).to receive(:new).twice.and_call_original
subject.perform
end
......@@ -25,7 +25,7 @@ describe Geo::GeoBackfillWorker, services: true do
it 'does not perform GeoSingleRepositoryBackfillWorker for projects that repository exists' do
create_list(:project, 2)
expect(GeoSingleRepositoryBackfillWorker).to receive(:new).exactly(2).and_call_original
expect(GeoSingleRepositoryBackfillWorker).to receive(:new).twice.and_call_original
subject.perform
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment