diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-10 00:07:56 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-10 00:07:56 +0000 |
commit | 775816e676aae53509d7b6f364945f2720636f72 (patch) | |
tree | 0baa821597f08edce720b236b0c07a6d13893f85 /spec/controllers | |
parent | e98d69bc8b8b926a727d36e37d2ee30c9fa28907 (diff) | |
download | gitlab-ce-775816e676aae53509d7b6f364945f2720636f72.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/git_http_controller_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/projects/git_http_controller_spec.rb b/spec/controllers/projects/git_http_controller_spec.rb index a898e1afd8f..4df53121aaa 100644 --- a/spec/controllers/projects/git_http_controller_spec.rb +++ b/spec/controllers/projects/git_http_controller_spec.rb @@ -90,6 +90,16 @@ describe Projects::GitHttpController do post :git_upload_pack, params: params end + context 'on a read-only instance' do + before do + allow(Gitlab::Database).to receive(:read_only?).and_return(true) + end + + it 'does not update project statistics' do + expect(ProjectDailyStatisticsWorker).not_to receive(:perform_async) + end + end + it 'updates project statistics' do expect(ProjectDailyStatisticsWorker).to receive(:perform_async) end |