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/finders/tags_finder_spec.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/finders/tags_finder_spec.rb')
-rw-r--r-- | spec/finders/tags_finder_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/finders/tags_finder_spec.rb b/spec/finders/tags_finder_spec.rb index 0bf9b228c8a..2af23c466fb 100644 --- a/spec/finders/tags_finder_spec.rb +++ b/spec/finders/tags_finder_spec.rb @@ -68,6 +68,14 @@ RSpec.describe TagsFinder do expect(result.count).to eq(1) end + it 'filters tags by name with wildcard' do + result = load_tags({ search: 'v1.*.0' }) + + expect(result.first.name).to eq('v1.0.0') + expect(result.second.name).to eq('v1.1.0') + expect(result.count).to eq(2) + end + it 'filters tags by nonexistent name that begins with' do result = load_tags({ search: '^nope' }) @@ -79,6 +87,11 @@ RSpec.describe TagsFinder do expect(result.count).to eq(0) end + it 'filters tags by nonexistent name with wildcard' do + result = load_tags({ search: 'n*e' }) + expect(result.count).to eq(0) + end + context 'when search is not a string' do it 'returns no matches' do result = load_tags({ search: { 'a' => 'b' } }) |