Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorAlexis Reigel <alexis.reigel.ext@siemens.com>2018-08-14 16:43:46 +0300
committerAlexis Reigel <alexis.reigel.ext@siemens.com>2019-03-14 20:15:40 +0300
commit70261ff11c93dcad30b0f4b3b61c4289d0ae1bb3 (patch)
tree6157c1cfd5b02e78ede0de294ed5af2d080d1ce9 /spec/lib
parentc53704398435e6585dbf7e26415a55162fa4e4a8 (diff)
add users search results to global search
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/search_results_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/search_results_spec.rb b/spec/lib/gitlab/search_results_spec.rb
index 87288baedb0..3d14eebc2c1 100644
--- a/spec/lib/gitlab/search_results_spec.rb
+++ b/spec/lib/gitlab/search_results_spec.rb
@@ -121,6 +121,18 @@ describe Gitlab::SearchResults do
results.objects('issues')
end
end
+
+ describe '#users' do
+ it 'returns an empty array when the current_user is not allowed to read users list' do
+ expect(results.objects('users')).to be_empty
+ end
+
+ it 'calls the UsersFinder' do
+ expect(UsersFinder).to receive(:new).with(user, search: 'foo').and_call_original
+
+ results.objects('users')
+ end
+ end
end
it 'does not list issues on private projects' do