diff options
author | Nick Thomas <nick@gitlab.com> | 2018-04-11 00:55:02 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-04-11 00:55:02 +0100 |
commit | 3f73bdd837f9803b75eca484a0a0615db6c58c80 (patch) | |
tree | 0bd2c99d9198bfa22e7a29f375131f940033da7b /spec/controllers/projects/branches_controller_spec.rb | |
parent | b594ab949d1a2ceb9d949ff2641679fbdf273452 (diff) | |
parent | 37a5632483b67ddcfa4c535cc911319b25f01fb5 (diff) | |
download | gitlab-ce-xterm-npm.tar.gz |
Merge branch 'master' into xterm-npmxterm-npm
Diffstat (limited to 'spec/controllers/projects/branches_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/branches_controller_spec.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/spec/controllers/projects/branches_controller_spec.rb b/spec/controllers/projects/branches_controller_spec.rb index 3b9e06cb5ad..16fb377b002 100644 --- a/spec/controllers/projects/branches_controller_spec.rb +++ b/spec/controllers/projects/branches_controller_spec.rb @@ -398,6 +398,22 @@ describe Projects::BranchesController do end end + # We need :request_store because Gitaly only counts the queries whenever + # `RequestStore.active?` in GitalyClient.enforce_gitaly_request_limits + # And the main goal of this test is making sure TooManyInvocationsError + # was not raised whenever the cache is enabled yet cold. + context 'when cache is enabled yet cold', :request_store do + it 'return with a status 200' do + get :index, + namespace_id: project.namespace, + project_id: project, + state: 'all', + format: :html + + expect(response).to have_gitlab_http_status(200) + end + end + context 'when branch contains an invalid UTF-8 sequence' do before do project.repository.create_branch("wrong-\xE5-utf8-sequence") @@ -414,7 +430,7 @@ describe Projects::BranchesController do end end - context 'when depreated sort/search/page parameters are specified' do + context 'when deprecated sort/search/page parameters are specified' do it 'returns with a status 301 when sort specified' do get :index, namespace_id: project.namespace, |