Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/git/process_ref_changes_service_spec.rb')
-rw-r--r--spec/services/git/process_ref_changes_service_spec.rb10
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