diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-14 16:41:11 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-14 16:41:11 +0000 |
commit | 0f393724e7de8d764577b6622ccf43964539cb2b (patch) | |
tree | f192f64badd0ab5b662c50a2ace3b49f349da5b9 /spec/models | |
parent | e318afbed70da9780c5deeb735f6acc8ab9327a1 (diff) | |
parent | 574b3efd6bfe7df64ec704844f2619c547731aa6 (diff) | |
download | gitlab-ce-0f393724e7de8d764577b6622ccf43964539cb2b.tar.gz |
Merge branch 'fix-exact-matches-of-username-and-email-on-top-of-the-user-search' into 'master'
Fixes the user order being overriden in the autocomplete controller
See merge request !12868
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/user_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index c614df8e98a..69f2570eec2 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -763,7 +763,7 @@ describe User, models: true do end it 'returns users with a partially matching name' do - expect(described_class.search(user.name[0..2])).to eq([user2, user]) + expect(described_class.search(user.name[0..2])).to eq([user, user2]) end it 'returns users with a matching name regardless of the casing' do @@ -777,7 +777,7 @@ describe User, models: true do end it 'returns users with a partially matching Email' do - expect(described_class.search(user.email[0..2])).to eq([user2, user]) + expect(described_class.search(user.email[0..2])).to eq([user, user2]) end it 'returns users with a matching Email regardless of the casing' do @@ -791,7 +791,7 @@ describe User, models: true do end it 'returns users with a partially matching username' do - expect(described_class.search(user.username[0..2])).to eq([user2, user]) + expect(described_class.search(user.username[0..2])).to eq([user, user2]) end it 'returns users with a matching username regardless of the casing' do |