Commit 7a2be384 authored by Michał Zając's avatar Michał Zając

Use finding factory instead of manual changes

parent 1a0d1ad0
......@@ -36,13 +36,7 @@ RSpec.describe Issues::CreateFromVulnerabilityService, '#execute' do
let(:vulnerability) { create(:vulnerability, :with_remediation, project: project) }
context 'when raw_metadata has no remediations' do
before do
finding = vulnerability.finding
metadata = Gitlab::Json.parse(finding.raw_metadata)
metadata.delete("remediations")
finding.raw_metadata = metadata.to_json
finding.save!
end
let(:vulnerability) { create(:vulnerability, :with_finding, project: project) }
it 'does not display Remediations section' do
expect(vulnerability.remediations).to eq(nil)
......
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