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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-21 21:07:57 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-21 21:07:57 +0300
commitc0b718a0dbd99e6c0d30e5bc55bdcf4a12946375 (patch)
tree8ad3691912d91d8cf7b3931f68a4284ae7b5995c /spec/lib/extracts_ref_spec.rb
parent5dc70663c4ff1feb215428ce50673b5b646f9809 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/extracts_ref_spec.rb')
-rw-r--r--spec/lib/extracts_ref_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/lib/extracts_ref_spec.rb b/spec/lib/extracts_ref_spec.rb
index 3e9a7499fdd..ca8af9413f3 100644
--- a/spec/lib/extracts_ref_spec.rb
+++ b/spec/lib/extracts_ref_spec.rb
@@ -44,6 +44,19 @@ RSpec.describe ExtractsRef do
expect { assign_ref_vars }.not_to raise_error
end
end
+
+ context 'when a ref_type parameter is provided' do
+ let(:params) { ActionController::Parameters.new(path: path, ref: ref, ref_type: 'tags') }
+
+ context 'and the use_ref_type_parameter feature flag is enabled' do
+ it 'sets a fully_qualified_ref variable' do
+ fully_qualified_ref = "refs/tags/#{ref}"
+ expect(container.repository).to receive(:commit).with(fully_qualified_ref)
+ assign_ref_vars
+ expect(@fully_qualified_ref).to eq(fully_qualified_ref)
+ end
+ end
+ end
end
it_behaves_like 'extracts refs'