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:
authorKamil Trzciński <ayufan@ayufan.eu>2018-07-31 14:14:05 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-07-31 14:14:05 +0300
commite9d04585f872121d4b1f96e019946cfa48d2f915 (patch)
tree0fb2192e215267081d41b19334215d91f6ef5497 /spec/models
parentd3e24d0503c10eacbd979899651e0a7a351f6645 (diff)
parent5e01ee78e5df3e381b3754c284d43faddb1cd47d (diff)
Merge branch 'fix-storage-size-for-artifacts-change' into 'master'
Update total storage size when changing size of artifacts See merge request gitlab-org/gitlab-ce!20697
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