diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-05-01 17:31:04 -0400 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2019-05-28 17:04:57 +0200 |
commit | 51183ad3bdad507325c14c916d70fe3ab9857bfc (patch) | |
tree | 294e5bb97dbe40a3b3fe9ed6c8ca3b015bfa496d /spec/models/ci | |
parent | df7bebd67c6307d16b2ac495e7cd09f55b39ba16 (diff) | |
download | gitlab-ce-51183ad3bdad507325c14c916d70fe3ab9857bfc.tar.gz |
Add all reports scope to Ci::JobArtifact
Diffstat (limited to 'spec/models/ci')
-rw-r--r-- | spec/models/ci/job_artifact_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/ci/job_artifact_spec.rb b/spec/models/ci/job_artifact_spec.rb index 5964f66c398..d3809f0a460 100644 --- a/spec/models/ci/job_artifact_spec.rb +++ b/spec/models/ci/job_artifact_spec.rb @@ -23,6 +23,21 @@ describe Ci::JobArtifact do it_behaves_like 'having unique enum values' + describe '.with_all_reports' do + let!(:artifact) { create(:ci_job_artifact, :archive) } + + subject { described_class.with_all_reports } + + it { is_expected.to be_empty } + + context 'when there are reports' do + let!(:metrics_report) { create(:ci_job_artifact, :junit) } + let!(:codequality_report) { create(:ci_job_artifact, :codequality) } + + it { is_expected.to eq([metrics_report, codequality_report]) } + end + end + describe '.test_reports' do subject { described_class.test_reports } |