summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-10 00:07:56 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-10 00:07:56 +0000
commit775816e676aae53509d7b6f364945f2720636f72 (patch)
tree0baa821597f08edce720b236b0c07a6d13893f85 /spec/controllers
parente98d69bc8b8b926a727d36e37d2ee30c9fa28907 (diff)
downloadgitlab-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.rb10
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