diff options
author | Nick Thomas <nick@gitlab.com> | 2019-06-27 17:55:24 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-06-27 17:55:24 +0300 |
commit | aa814403a9502358fbe4d6aec71d6e4f68d2acb9 (patch) | |
tree | 43c9bd1701c2a062031c0e7ca460c2466e2902ed /spec | |
parent | 63188fa16fe921da93c605ed376a8ef00eb7edef (diff) | |
parent | 80e6e75c9f0f29979afcff90a16a2dd9a75ceb85 (diff) |
Merge branch 'sh-avoid-loading-pipeline-status' into 'master'
Avoid loading pipeline status in search results
See merge request gitlab-org/gitlab-ce!30111
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/search_controller_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb index fd36ff812ff..5a5c0a1f6ac 100644 --- a/spec/controllers/search_controller_spec.rb +++ b/spec/controllers/search_controller_spec.rb @@ -39,6 +39,19 @@ describe SearchController do end end + context 'global search' do + render_views + + it 'omits pipeline status from load' do + project = create(:project, :public) + expect(Gitlab::Cache::Ci::ProjectPipelineStatus).not_to receive(:load_in_batch_for_projects) + + get :show, params: { scope: 'projects', search: project.name } + + expect(assigns[:search_objects].first).to eq project + end + end + it 'finds issue comments' do project = create(:project, :public) note = create(:note_on_issue, project: project) |