diff options
author | Robert Speicher <robert@gitlab.com> | 2018-01-19 02:13:44 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-01-19 02:13:44 +0300 |
commit | 584fc5c5a7a5cbf36110135599c3d7a1e92bad5a (patch) | |
tree | f46817afcc514c15aae7b8f631c7a6b2f1c2188d /spec | |
parent | 676d558a37ad59d042fc3640c66c452944884851 (diff) | |
parent | 22aef3d424187b2178698af7d4f2dda1aef43cb8 (diff) |
Merge branch '42154-fix-artifact-size-calc' into 'master'
Resolve "Bug calculating artifacts size for project statistics"
Closes #42154
See merge request gitlab-org/gitlab-ce!16539
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 e78ed1df821..5cff2af4aca 100644 --- a/spec/models/project_statistics_spec.rb +++ b/spec/models/project_statistics_spec.rb @@ -146,6 +146,12 @@ describe ProjectStatistics do expect(statistics.build_artifacts_size).to be(106365) end + + it 'calculates related build artifacts by project' do + expect(Ci::JobArtifact).to receive(:artifacts_size_for).with(project) { 0 } + + statistics.update_build_artifacts_size + end end context 'when legacy artifacts are used' do |