Commit ca7f2dc3 authored by Michał Zając's avatar Michał Zając

Batch fix specs

parent 6e676c4c
......@@ -55,7 +55,7 @@ RSpec.describe Gitlab::Ci::Reports::Security::Reports do
context "when none of the reports have a high severity vulnerability" do
before do
subject.get_report('sast', artifact).finding(low_severity)
subject.get_report('sast', artifact).add_finding(low_severity)
subject.get_report('sast', artifact).add_finding(low_severity)
subject.get_report('dependency_scanning', artifact).add_finding(low_severity)
end
......
......@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe Vulnerabilities::Scanner do
describe 'associations' do
it { is_expected.to have_many(:findings).class_name('Vulnerabilities::Finding').with_foreign_key('occurrence_id') }
it { is_expected.to have_many(:findings).class_name('Vulnerabilities::Finding') }
it { is_expected.to belong_to(:project) }
end
......
......@@ -40,7 +40,7 @@ RSpec.describe 'GET /-/security/vulnerability_findings' do
expect(response).to have_gitlab_http_status(:ok)
expect(json_response.length).to eq 2
expect(json_response.first['id']).to be(critical_vulnerability.id)
expect(response).to match_response_schema('vulnerabilities/occurrence_list', dir: 'ee')
expect(response).to match_response_schema('vulnerabilities/finding_list', dir: 'ee')
end
context 'when a specific page is requested' do
......
......@@ -62,7 +62,7 @@ RSpec.describe Security::StoreReportService, '#execute' do
before do
allow(Gitlab::ErrorTracking).to receive(:track_and_raise_exception).and_call_original
report.finding(finding_without_name)
report.add_finding(finding_without_name)
end
it 'raises invalid record error' do
......
......@@ -40,7 +40,7 @@ RSpec.shared_examples ProjectVulnerabilityFindingsActions do
end
expect(json_response.first['blob_path']).to eq(blob_path)
expect(response).to match_response_schema('vulnerabilities/occurrence_list', dir: 'ee')
expect(response).to match_response_schema('vulnerabilities/finding_list', dir: 'ee')
end
context 'when a specific page is requested' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment