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:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2017-09-21 11:34:12 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-12-03 14:04:48 +0300
commit61864a5a5bb523953589c9398a431c4369fbfc76 (patch)
tree5eac32ef8155e9066d7d1488d7856e83605aa6a5 /spec/models/project_statistics_spec.rb
parent25df666156279e5b392b429519b4f4ba01eefaac (diff)
Rename Artifact to JobArtifact, split metadata out
Two things at ones, as there was no clean way to seperate the commit and give me feedback from the tests. But the model Artifact is now JobArtifact, and the table does not have a type anymore, but the metadata is now its own model: Ci::JobArtifactMetadata.
Diffstat (limited to 'spec/models/project_statistics_spec.rb')
-rw-r--r--spec/models/project_statistics_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/models/project_statistics_spec.rb b/spec/models/project_statistics_spec.rb
index 59e20e84c2f..95e8d519bdd 100644
--- a/spec/models/project_statistics_spec.rb
+++ b/spec/models/project_statistics_spec.rb
@@ -133,15 +133,17 @@ describe ProjectStatistics do
describe '#update_build_artifacts_size' do
let!(:pipeline) { create(:ci_pipeline, project: project) }
- let!(:build1) { create(:ci_build, pipeline: pipeline, artifacts_size: 45.megabytes) }
- let!(:build2) { create(:ci_build, pipeline: pipeline, artifacts_size: 56.megabytes) }
+ let!(:ci_build) { create(:ci_build, pipeline: pipeline, artifacts_size: 45.megabytes) }
before do
+ create(:ci_build, pipeline: pipeline, artifacts_size: 56.megabytes)
+ create(:ci_job_artifact, project: pipeline.project, job: ci_build)
+
statistics.update_build_artifacts_size
end
it "stores the size of related build artifacts" do
- expect(statistics.build_artifacts_size).to eq 101.megabytes
+ expect(statistics.build_artifacts_size).to eq(106012541)
end
end