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/lib/extracts_ref_spec.rb')
-rw-r--r--spec/lib/extracts_ref_spec.rb24
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