diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-21 21:07:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-21 21:07:57 +0300 |
commit | c0b718a0dbd99e6c0d30e5bc55bdcf4a12946375 (patch) | |
tree | 8ad3691912d91d8cf7b3931f68a4284ae7b5995c /spec/lib/extracts_ref_spec.rb | |
parent | 5dc70663c4ff1feb215428ce50673b5b646f9809 (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.rb | 13 |
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' |