diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
commit | 419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch) | |
tree | 1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /spec/lib/extracts_ref_spec.rb | |
parent | 1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff) |
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'spec/lib/extracts_ref_spec.rb')
-rw-r--r-- | spec/lib/extracts_ref_spec.rb | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/spec/lib/extracts_ref_spec.rb b/spec/lib/extracts_ref_spec.rb index ac403ad642a..9ff11899e89 100644 --- a/spec/lib/extracts_ref_spec.rb +++ b/spec/lib/extracts_ref_spec.rb @@ -87,32 +87,16 @@ RSpec.describe ExtractsRef do it { is_expected.to eq('tags') } end - context 'when ref_type is invalid' do - let(:ref_type) { 'invalid' } + context 'when case does not match' do + let(:ref_type) { 'tAgS' } - it { is_expected.to eq(nil) } - end - end - - describe '.qualify_ref' do - subject { described_class.qualify_ref(ref, ref_type) } - - context 'when ref_type is nil' do - let(:ref_type) { nil } - - it { is_expected.to eq(ref) } - end - - context 'when ref_type valid' do - let(:ref_type) { 'heads' } - - it { is_expected.to eq("refs/#{ref_type}/#{ref}") } + it { is_expected.to(eq('tags')) } end context 'when ref_type is invalid' do let(:ref_type) { 'invalid' } - it { is_expected.to eq(ref) } + it { is_expected.to eq(nil) } end end |