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

vulnerability_finding_helpers_spec.rb « concerns « models « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 023ecccb5207a89cc996aecfef078ab2a7c9f355 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe VulnerabilityFindingHelpers do
  let(:cls) do
    Class.new do
      include VulnerabilityFindingHelpers

      attr_accessor :report_type

      def initialize(report_type)
        @report_type = report_type
      end
    end
  end

  describe '#requires_manual_resolution?' do
    it 'returns false if the finding does not require manual resolution' do
      expect(cls.new('sast').requires_manual_resolution?).to eq(false)
    end

    it 'returns true when the finding requires manual resolution' do
      expect(cls.new('secret_detection').requires_manual_resolution?).to eq(true)
    end
  end
end