diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-02 21:26:55 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-02 21:27:04 +0000 |
commit | 1bae6f29f2381374f5ad1300e70111294989ce9c (patch) | |
tree | 20392b781e5cf97cf27463275e98d814010cadfa /spec/services/git | |
parent | b30f7e36de53f94df4022815d3fbdadc4368a7e3 (diff) | |
download | gitlab-ce-1bae6f29f2381374f5ad1300e70111294989ce9c.tar.gz |
Add latest changes from gitlab-org/security/gitlab@14-1-stable-ee
Diffstat (limited to 'spec/services/git')
-rw-r--r-- | spec/services/git/process_ref_changes_service_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/services/git/process_ref_changes_service_spec.rb b/spec/services/git/process_ref_changes_service_spec.rb index 087f4ba372b..ac9bac4e6ad 100644 --- a/spec/services/git/process_ref_changes_service_spec.rb +++ b/spec/services/git/process_ref_changes_service_spec.rb @@ -109,9 +109,13 @@ RSpec.describe Git::ProcessRefChangesService do .to receive(:commit) .and_return(project.commit) - allow_any_instance_of(Repository) - .to receive(:branch_exists?) - .and_return(true) + if changes_method == :branch_changes + allow_any_instance_of(Repository).to receive(:branch_exists?) { true } + end + + if changes_method == :tag_changes + allow_any_instance_of(Repository).to receive(:tag_exists?) { true } + end end context 'when git_push_create_all_pipelines is disabled' do |