Welcome to mirror list, hosted at ThFree Co, Russian Federation.

reports_spec.rb « sbom « reports « ci « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 97d8d7abb3340fdfa8f77753581e13d5af306cae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::Ci::Reports::Sbom::Reports do
  subject(:reports_list) { described_class.new }

  describe '#add_report' do
    let(:rep1) { Gitlab::Ci::Reports::Sbom::Report.new }
    let(:rep2) { Gitlab::Ci::Reports::Sbom::Report.new }

    it 'appends the report to the report list' do
      reports_list.add_report(rep1)
      reports_list.add_report(rep2)

      expect(reports_list.reports.length).to eq(2)
      expect(reports_list.reports.first).to eq(rep1)
      expect(reports_list.reports.last).to eq(rep2)
    end
  end
end