summaryrefslogtreecommitdiff
path: root/spec/models/user_spec.rb
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-07-14 12:16:20 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-07-14 16:31:45 +0100
commit574b3efd6bfe7df64ec704844f2619c547731aa6 (patch)
tree4561b1d84dff79e8561fe42c9afa198f46db4c83 /spec/models/user_spec.rb
parent60b91b46f289b1e4ac72827cf01370b2604622ac (diff)
downloadgitlab-ce-574b3efd6bfe7df64ec704844f2619c547731aa6.tar.gz
Fixes the user order being overriden in the autocomplete controllerfix-exact-matches-of-username-and-email-on-top-of-the-user-search
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb6
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