Commit 3a4da8ce authored by Lin Jen-Shin's avatar Lin Jen-Shin

Fix tests

parent 081e2fce
require 'securerandom' require 'securerandom'
class Repository class Repository
REF_MERGE_REQUEST = 'merge-requests' REF_MERGE_REQUEST = 'merge-requests'.freeze
REF_KEEP_AROUND = 'keep-around' REF_KEEP_AROUND = 'keep-around'.freeze
REF_ENVIRONMENTS = 'environments' REF_ENVIRONMENTS = 'environments'.freeze
RESERVED_REFS_NAMES = %W[ RESERVED_REFS_NAMES = %W[
heads heads
......
...@@ -1563,14 +1563,14 @@ describe Project do ...@@ -1563,14 +1563,14 @@ describe Project do
describe 'project import state transitions' do describe 'project import state transitions' do
context 'state transition: [:started] => [:finished]' do context 'state transition: [:started] => [:finished]' do
let(:housecleaning_service) { spy(:housecleaning_service) } let(:after_import_service) { spy(:after_import_service) }
let(:housekeeping_service) { spy(:housekeeping_service) } let(:housekeeping_service) { spy(:housekeeping_service) }
before do before do
allow(Projects::HousecleaningService) allow(Projects::AfterImportService)
.to receive(:new) { housecleaning_service } .to receive(:new) { after_import_service }
allow(housecleaning_service) allow(after_import_service)
.to receive(:execute) { housekeeping_service.execute } .to receive(:execute) { housekeeping_service.execute }
allow(Projects::HousekeepingService) allow(Projects::HousekeepingService)
...@@ -1589,7 +1589,7 @@ describe Project do ...@@ -1589,7 +1589,7 @@ describe Project do
project.import_finish project.import_finish
expect(housecleaning_service).to have_received(:execute) expect(after_import_service).to have_received(:execute)
expect(housekeeping_service).to have_received(:execute) expect(housekeeping_service).to have_received(:execute)
end 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