diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-07-31 14:14:05 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-07-31 14:14:05 +0300 |
commit | e9d04585f872121d4b1f96e019946cfa48d2f915 (patch) | |
tree | 0fb2192e215267081d41b19334215d91f6ef5497 /spec | |
parent | d3e24d0503c10eacbd979899651e0a7a351f6645 (diff) | |
parent | 5e01ee78e5df3e381b3754c284d43faddb1cd47d (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')
-rw-r--r-- | spec/models/project_statistics_spec.rb | 6 |
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 |