diff options
author | George Andrinopoulos <geoandri@gmail.com> | 2017-10-22 17:50:58 +0300 |
---|---|---|
committer | George Andrinopoulos <geoandri@gmail.com> | 2017-10-23 06:37:25 +0300 |
commit | 1cf35c3d1d274a24bf7b6283bf5d43ca0ffe8a10 (patch) | |
tree | 3ae5372dcc7bde868457b79d1d6ab3f2eeb3b811 /spec/finders | |
parent | cc8af554fdfa6d54315ae50465c42603a44780b1 (diff) | |
download | gitlab-ce-1cf35c3d1d274a24bf7b6283bf5d43ca0ffe8a10.tar.gz |
Add case insensitive branches search
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/branches_finder_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/finders/branches_finder_spec.rb b/spec/finders/branches_finder_spec.rb index 91f34973ba5..9e3f2c69606 100644 --- a/spec/finders/branches_finder_spec.rb +++ b/spec/finders/branches_finder_spec.rb @@ -46,6 +46,15 @@ describe BranchesFinder do expect(result.count).to eq(1) end + it 'filters branches by name ignoring letter case' do + branches_finder = described_class.new(repository, { search: 'FiX' }) + + result = branches_finder.execute + + expect(result.first.name).to eq('fix') + expect(result.count).to eq(1) + end + it 'does not find any branch with that name' do branches_finder = described_class.new(repository, { search: 'random' }) |