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:
authorNick Thomas <nick@gitlab.com>2018-01-18 05:31:19 +0300
committerNick Thomas <nick@gitlab.com>2018-01-18 20:48:09 +0300
commit22aef3d424187b2178698af7d4f2dda1aef43cb8 (patch)
tree1793674e2c44e27d5ebbacbca3fb8c3438e0f68d /spec/models/project_statistics_spec.rb
parent7b0872c7237a21eacd076b09be5712a4ef63b99f (diff)
Fix a bug calculating artifact size for project statistics
Diffstat (limited to 'spec/models/project_statistics_spec.rb')
-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 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