Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2018-07-18 19:25:56 +0300
committerPeter Marko <peter.marko@siemens.com>2018-07-27 18:21:41 +0300
commit5e01ee78e5df3e381b3754c284d43faddb1cd47d (patch)
tree60401ee0794bc65e7b8e38e8a8048e9ba9d117d3 /spec/models
parent20938681f65e136c869813da6d1a45bd7c8dde7d (diff)
Update total storage size when changing size of artifacts
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/project_statistics_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/project_statistics_spec.rb b/spec/models/project_statistics_spec.rb
index 38a3590ad12..64c39f09e33 100644
--- a/spec/models/project_statistics_spec.rb
+++ b/spec/models/project_statistics_spec.rb
@@ -128,6 +128,12 @@ describe ProjectStatistics do
.by(13)
end
+ it 'increases also storage size by that amount' do
+ expect { described_class.increment_statistic(project.id, :build_artifacts_size, 20) }
+ .to change { statistics.reload.storage_size }
+ .by(20)
+ end
+
context 'when the amount is 0' do
it 'does not execute a query' do
project