Commit 9fa855ab authored by Sean McGivern's avatar Sean McGivern

Merge branch '10157_add-issue-to-vuln-feedback-factory' into 'master'

Add associated-issue to vulnerability_feedback factory

Closes #10157

See merge request gitlab-org/gitlab-ee!9803
parents 6a7e10ab 05ee0773
...@@ -14,10 +14,8 @@ describe Projects::VulnerabilityFeedbackController do ...@@ -14,10 +14,8 @@ describe Projects::VulnerabilityFeedbackController do
let(:pipeline_1) { create(:ci_pipeline, project: project) } let(:pipeline_1) { create(:ci_pipeline, project: project) }
let(:pipeline_2) { create(:ci_pipeline, project: project) } let(:pipeline_2) { create(:ci_pipeline, project: project) }
let(:issue) { create(:issue, project: project) }
let!(:vuln_feedback_1) { create(:vulnerability_feedback, :dismissal, :sast, project: project, author: user, pipeline: pipeline_1) } let!(:vuln_feedback_1) { create(:vulnerability_feedback, :dismissal, :sast, project: project, author: user, pipeline: pipeline_1) }
let!(:vuln_feedback_2) { create(:vulnerability_feedback, :issue, :sast, project: project, author: user, pipeline: pipeline_1, issue: issue) } let!(:vuln_feedback_2) { create(:vulnerability_feedback, :issue, :sast, project: project, author: user, pipeline: pipeline_1) }
let!(:vuln_feedback_3) { create(:vulnerability_feedback, :dismissal, :sast, project: project, author: user, pipeline: pipeline_2) } let!(:vuln_feedback_3) { create(:vulnerability_feedback, :dismissal, :sast, project: project, author: user, pipeline: pipeline_2) }
let!(:vuln_feedback_4) { create(:vulnerability_feedback, :dismissal, :dependency_scanning, project: project, author: user, pipeline: pipeline_2) } let!(:vuln_feedback_4) { create(:vulnerability_feedback, :dismissal, :dependency_scanning, project: project, author: user, pipeline: pipeline_2) }
......
...@@ -21,6 +21,7 @@ FactoryBot.define do ...@@ -21,6 +21,7 @@ FactoryBot.define do
trait :issue do trait :issue do
feedback_type 'issue' feedback_type 'issue'
issue { create(:issue, project: project) }
end end
trait :sast do trait :sast do
......
...@@ -31,7 +31,6 @@ describe Vulnerabilities::OccurrenceEntity do ...@@ -31,7 +31,6 @@ describe Vulnerabilities::OccurrenceEntity do
let!(:issue_feedback) do let!(:issue_feedback) do
create(:vulnerability_feedback, :sast, :issue, create(:vulnerability_feedback, :sast, :issue,
issue: create(:issue, project: project),
project: project, project_fingerprint: occurrence.project_fingerprint) project: project, project_fingerprint: occurrence.project_fingerprint)
end end
......
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