summaryrefslogtreecommitdiff
path: root/spec/finders/issues_finder_spec.rb
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2019-05-07 11:08:25 +0000
committerJames Lopez <james@gitlab.com>2019-05-07 11:08:25 +0000
commit68e533dc219be27f3485d2335e70aa61a193dabb (patch)
treef26b2a94b515469839f8498e18698f3782187260 /spec/finders/issues_finder_spec.rb
parent0910dfb9d6eb9748b6ca24e10a3382a6515615e5 (diff)
downloadgitlab-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/issues_finder_spec.rb')
-rw-r--r--spec/finders/issues_finder_spec.rb8
1 files changed, 2 insertions, 6 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