diff options
author | Nick Thomas <nick@gitlab.com> | 2018-01-18 05:31:19 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-01-18 20:48:09 +0300 |
commit | 22aef3d424187b2178698af7d4f2dda1aef43cb8 (patch) | |
tree | 1793674e2c44e27d5ebbacbca3fb8c3438e0f68d /spec | |
parent | 7b0872c7237a21eacd076b09be5712a4ef63b99f (diff) |
Fix a bug calculating artifact size for project statistics
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 |