diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-17 18:09:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-17 18:09:44 +0000 |
commit | 2c156e3c7bbade01c36eee18327f1ced6eebea79 (patch) | |
tree | 115fa8dbf6bc05037378b380311d31acb805f54c /spec/models/ci/job_artifact_spec.rb | |
parent | 8e129497b2565b8c595ef4f806d9a9595ca654e5 (diff) | |
download | gitlab-ce-2c156e3c7bbade01c36eee18327f1ced6eebea79.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/ci/job_artifact_spec.rb')
-rw-r--r-- | spec/models/ci/job_artifact_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/ci/job_artifact_spec.rb b/spec/models/ci/job_artifact_spec.rb index 0a7a44b225c..de93c3c1675 100644 --- a/spec/models/ci/job_artifact_spec.rb +++ b/spec/models/ci/job_artifact_spec.rb @@ -70,6 +70,22 @@ describe Ci::JobArtifact do end end + describe '.coverage_reports' do + subject { described_class.coverage_reports } + + context 'when there is a coverage report' do + let!(:artifact) { create(:ci_job_artifact, :cobertura) } + + it { is_expected.to eq([artifact]) } + end + + context 'when there are no coverage reports' do + let!(:artifact) { create(:ci_job_artifact, :archive) } + + it { is_expected.to be_empty } + end + end + describe '.erasable' do subject { described_class.erasable } |