diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-27 18:06:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-27 18:06:45 +0300 |
commit | a98649b71085bcd21af674a47d6a746336c56a65 (patch) | |
tree | 1e518ce4f61a8d7260ba9d6d3b8db8906251d6a0 /spec/graphql/resolvers | |
parent | a4484fd22dd0d055a10fe084b82349e42f7363e1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql/resolvers')
-rw-r--r-- | spec/graphql/resolvers/issues_resolver_spec.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/graphql/resolvers/issues_resolver_spec.rb b/spec/graphql/resolvers/issues_resolver_spec.rb index bf9106643eb..9e75a6cad60 100644 --- a/spec/graphql/resolvers/issues_resolver_spec.rb +++ b/spec/graphql/resolvers/issues_resolver_spec.rb @@ -68,8 +68,22 @@ describe Resolvers::IssuesResolver do end end - it 'searches issues' do - expect(resolve_issues(search: 'foo')).to contain_exactly(issue2) + context 'when searching issues' do + it 'returns correct issues' do + expect(resolve_issues(search: 'foo')).to contain_exactly(issue2) + end + + it 'uses project search optimization' do + expected_arguments = { + search: 'foo', + attempt_project_search_optimizations: true, + iids: [], + project_id: project.id + } + expect(IssuesFinder).to receive(:new).with(anything, expected_arguments).and_call_original + + resolve_issues(search: 'foo') + end end describe 'sorting' do |