diff options
author | Stan Hu <stanhu@gmail.com> | 2019-06-26 16:19:59 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-06-26 16:24:46 -0700 |
commit | ee791d3f40913fa57d878aecb9bf8c86ea27e3b4 (patch) | |
tree | 495a2b3e9b6f60e8b671567560ee7c3c56775641 /spec/controllers/search_controller_spec.rb | |
parent | 13d8992006c5212726b843c4dd06d43caab2f7f9 (diff) | |
download | gitlab-ce-ee791d3f40913fa57d878aecb9bf8c86ea27e3b4.tar.gz |
Enable Gitaly ref caching for SearchControllersh-add-gitaly-ref-caching-search-controller
As we noticed in
https://gitlab.com/gitlab-org/gitlab-ce/issues/56627#note_185828742,
clicking on the "Issues" tab often requests the same reference in
rendering Markdown.
Diffstat (limited to 'spec/controllers/search_controller_spec.rb')
-rw-r--r-- | spec/controllers/search_controller_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb index 4634d1d4bb3..fd36ff812ff 100644 --- a/spec/controllers/search_controller_spec.rb +++ b/spec/controllers/search_controller_spec.rb @@ -17,6 +17,10 @@ describe SearchController do set(:project) { create(:project, :public, :repository, :wiki_repo) } + before do + expect(::Gitlab::GitalyClient).to receive(:allow_ref_name_caching).and_call_original + end + subject { get(:show, params: { project_id: project.id, scope: scope, search: 'merge' }) } where(:partial, :scope) do |