diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2019-05-07 11:08:25 +0000 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2019-05-07 11:08:25 +0000 |
commit | 68e533dc219be27f3485d2335e70aa61a193dabb (patch) | |
tree | f26b2a94b515469839f8498e18698f3782187260 /spec/finders | |
parent | 0910dfb9d6eb9748b6ca24e10a3382a6515615e5 (diff) | |
download | gitlab-ce-68e533dc219be27f3485d2335e70aa61a193dabb.tar.gz |
Add improvements to the global search process
Removed the conditions added to
Project.with_feature_available_for_user, and moved to the
IssuableFinder. Now, we ensure that, in the projects retrieved
in the Finder, the user has enough access for the feature.
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/issues_finder_spec.rb | 8 | ||||
-rw-r--r-- | spec/finders/merge_requests_finder_spec.rb | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/spec/finders/issues_finder_spec.rb b/spec/finders/issues_finder_spec.rb index 6a47cd013f8..89fdaceaa9f 100644 --- a/spec/finders/issues_finder_spec.rb +++ b/spec/finders/issues_finder_spec.rb @@ -641,9 +641,7 @@ describe IssuesFinder do end it 'filters by confidentiality' do - expect(Issue).to receive(:where).with(a_string_matching('confidential'), anything) - - subject + expect(subject.to_sql).to match("issues.confidential") end end @@ -660,9 +658,7 @@ describe IssuesFinder do end it 'filters by confidentiality' do - expect(Issue).to receive(:where).with(a_string_matching('confidential'), anything) - - subject + expect(subject.to_sql).to match("issues.confidential") end end diff --git a/spec/finders/merge_requests_finder_spec.rb b/spec/finders/merge_requests_finder_spec.rb index 117f4a03735..da5e9dab058 100644 --- a/spec/finders/merge_requests_finder_spec.rb +++ b/spec/finders/merge_requests_finder_spec.rb @@ -31,7 +31,7 @@ describe MergeRequestsFinder do end context 'filtering by group' do - it 'includes all merge requests when user has access exceluding merge requests from projects the user does not have access to' do + it 'includes all merge requests when user has access excluding merge requests from projects the user does not have access to' do private_project = allow_gitaly_n_plus_1 { create(:project, :private, group: group) } private_project.add_guest(user) create(:merge_request, :simple, author: user, source_project: private_project, target_project: private_project) |