Skip to content
Snippets Groups Projects
Commit 3a4da8ce authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Fix tests

parent 081e2fce
No related branches found
No related tags found
No related merge requests found
require 'securerandom'
 
class Repository
REF_MERGE_REQUEST = 'merge-requests'
REF_KEEP_AROUND = 'keep-around'
REF_ENVIRONMENTS = 'environments'
REF_MERGE_REQUEST = 'merge-requests'.freeze
REF_KEEP_AROUND = 'keep-around'.freeze
REF_ENVIRONMENTS = 'environments'.freeze
 
RESERVED_REFS_NAMES = %W[
heads
Loading
Loading
Loading
Loading
@@ -1563,14 +1563,14 @@ describe Project do
 
describe 'project import state transitions' 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) }
 
before do
allow(Projects::HousecleaningService)
.to receive(:new) { housecleaning_service }
allow(Projects::AfterImportService)
.to receive(:new) { after_import_service }
 
allow(housecleaning_service)
allow(after_import_service)
.to receive(:execute) { housekeeping_service.execute }
 
allow(Projects::HousekeepingService)
Loading
Loading
@@ -1589,7 +1589,7 @@ describe Project do
 
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)
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment