diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/lib/extracts_ref_spec.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
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' |