summaryrefslogtreecommitdiff
path: root/spec/controllers/projects_controller_spec.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-04-05 04:33:01 -0700
committerStan Hu <stanhu@gmail.com>2019-04-05 04:52:42 -0700
commitf1dce2160956f27fecc4a59d36d1e1e03903a84b (patch)
treeeb046c94683963261349d059978bb8b0af986027 /spec/controllers/projects_controller_spec.rb
parent3962b00b4bdea67107b9f43e1c44e9bacb98560d (diff)
downloadgitlab-ce-f1dce2160956f27fecc4a59d36d1e1e03903a84b.tar.gz
Enable FindCommit caching for project and commits pages
This reduces a handful of duplicate FindCommit calls while viewing the projects and commits pages.
Diffstat (limited to 'spec/controllers/projects_controller_spec.rb')
-rw-r--r--spec/controllers/projects_controller_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb
index 04cc315b175..1ce06bc877c 100644
--- a/spec/controllers/projects_controller_spec.rb
+++ b/spec/controllers/projects_controller_spec.rb
@@ -78,6 +78,10 @@ describe ProjectsController do
end
context "user has access to project" do
+ before do
+ expect(::Gitlab::GitalyClient).to receive(:allow_ref_name_caching).and_call_original
+ end
+
context "and does not have notification setting" do
it "initializes notification as disabled" do
get :show, params: { namespace_id: public_project.namespace, id: public_project }