diff options
Diffstat (limited to 'spec/models/ci/job_artifact_spec.rb')
-rw-r--r-- | spec/models/ci/job_artifact_spec.rb | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/spec/models/ci/job_artifact_spec.rb b/spec/models/ci/job_artifact_spec.rb index 1ba66565e03..5e79a601b0f 100644 --- a/spec/models/ci/job_artifact_spec.rb +++ b/spec/models/ci/job_artifact_spec.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: true + # frozen_string_literal: true require 'spec_helper' @@ -176,6 +176,29 @@ describe Ci::JobArtifact do end end + describe '.report_file_types' do + EXPECTED_REPORT_TYPES = + %w[ + junit + codequality + sast + dependency_scanning + container_scanning + dast + license_management + performance + ].freeze + + subject { described_class.report_file_types } + + it 'returns file types that correspond to reports' do + # If this test fails chances are you've added a new + # artifact file_type and must decide whether or not + # it's a report. + expect(subject.keys).to match_array(EXPECTED_REPORT_TYPES) + end + end + describe '#file' do subject { artifact.file } |