diff options
| author | Douwe Maan <douwe@gitlab.com> | 2018-02-23 13:47:43 +0000 |
|---|---|---|
| committer | Douwe Maan <douwe@gitlab.com> | 2018-02-23 13:47:43 +0000 |
| commit | bb0fe96f75c6a39e57ac5e9f1895a85f8453e3a5 (patch) | |
| tree | fe269a7d864843602b7fe88cfad8650dd4e0b4a8 /spec/lib | |
| parent | 58a312f5097b30a93100de93d06427402d514b48 (diff) | |
| parent | 090eeb581b3809ab83d52f7baa2bcfbd63b1c2ba (diff) | |
| download | gitlab-ce-bb0fe96f75c6a39e57ac5e9f1895a85f8453e3a5.tar.gz | |
Merge branch 'users-autocomplete' into 'master'
Improve performance of searching for and auto completing of users
See merge request gitlab-org/gitlab-ce!17158
Diffstat (limited to 'spec/lib')
| -rw-r--r-- | spec/lib/gitlab/sql/pattern_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/sql/pattern_spec.rb b/spec/lib/gitlab/sql/pattern_spec.rb index ef51e3cc8df..5b5052de372 100644 --- a/spec/lib/gitlab/sql/pattern_spec.rb +++ b/spec/lib/gitlab/sql/pattern_spec.rb @@ -154,6 +154,12 @@ describe Gitlab::SQL::Pattern do it 'returns a single equality condition' do expect(fuzzy_arel_match.to_sql).to match(/title.*I?LIKE 'fo'/) end + + it 'uses LOWER instead of ILIKE when LOWER is enabled' do + rel = Issue.fuzzy_arel_match(:title, query, lower_exact_match: true) + + expect(rel.to_sql).to match(/LOWER\(.*title.*\).*=.*'fo'/) + end end context 'with two words both equal to 3 chars' do |
