diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-03 18:06:49 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-03 18:06:49 +0000 |
commit | ab7cf450ba19cf80b9534f25dc707b33845e3014 (patch) | |
tree | bbfa6aba83c48aea68d79c4179ce576b6eec326d /spec/services/merge_requests | |
parent | 4204cf308596e0e26f578a6e2da88f49c0f4aad9 (diff) | |
download | gitlab-ce-ab7cf450ba19cf80b9534f25dc707b33845e3014.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/merge_requests')
-rw-r--r-- | spec/services/merge_requests/merge_service_spec.rb | 11 | ||||
-rw-r--r-- | spec/services/merge_requests/merge_to_ref_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/merge_requests/refresh_service_spec.rb | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/spec/services/merge_requests/merge_service_spec.rb b/spec/services/merge_requests/merge_service_spec.rb index 1bdea973685..61c8103353c 100644 --- a/spec/services/merge_requests/merge_service_spec.rb +++ b/spec/services/merge_requests/merge_service_spec.rb @@ -211,7 +211,8 @@ describe MergeRequests::MergeService do end it 'does not delete the source branch' do - expect(DeleteBranchService).not_to receive(:new) + expect(::Branches::DeleteService).not_to receive(:new) + service.execute(merge_request) end end @@ -226,7 +227,7 @@ describe MergeRequests::MergeService do end it 'does not delete the source branch' do - expect(DeleteBranchService).not_to receive(:new) + expect(::Branches::DeleteService).not_to receive(:new) service.execute(merge_request) end end @@ -238,7 +239,7 @@ describe MergeRequests::MergeService do end it 'removes the source branch using the author user' do - expect(DeleteBranchService).to receive(:new) + expect(::Branches::DeleteService).to receive(:new) .with(merge_request.source_project, merge_request.author) .and_call_original service.execute(merge_request) @@ -248,7 +249,7 @@ describe MergeRequests::MergeService do let(:service) { described_class.new(project, user, merge_params.merge('should_remove_source_branch' => false)) } it 'does not delete the source branch' do - expect(DeleteBranchService).not_to receive(:new) + expect(::Branches::DeleteService).not_to receive(:new) service.execute(merge_request) end end @@ -260,7 +261,7 @@ describe MergeRequests::MergeService do end it 'removes the source branch using the current user' do - expect(DeleteBranchService).to receive(:new) + expect(::Branches::DeleteService).to receive(:new) .with(merge_request.source_project, user) .and_call_original service.execute(merge_request) diff --git a/spec/services/merge_requests/merge_to_ref_service_spec.rb b/spec/services/merge_requests/merge_to_ref_service_spec.rb index cccafddc450..77e38f1eb4c 100644 --- a/spec/services/merge_requests/merge_to_ref_service_spec.rb +++ b/spec/services/merge_requests/merge_to_ref_service_spec.rb @@ -61,7 +61,7 @@ describe MergeRequests::MergeToRefService do end it 'does not delete the source branch' do - expect(DeleteBranchService).not_to receive(:new) + expect(::Branches::DeleteService).not_to receive(:new) process_merge_to_ref end diff --git a/spec/services/merge_requests/refresh_service_spec.rb b/spec/services/merge_requests/refresh_service_spec.rb index 9d0ad60a624..9e69f179da9 100644 --- a/spec/services/merge_requests/refresh_service_spec.rb +++ b/spec/services/merge_requests/refresh_service_spec.rb @@ -113,7 +113,7 @@ describe MergeRequests::RefreshService do context 'when source branch ref does not exists' do before do - DeleteBranchService.new(@project, @user).execute(@merge_request.source_branch) + ::Branches::DeleteService.new(@project, @user).execute(@merge_request.source_branch) end it 'closes MRs without source branch ref' do |