Commit 2ba934ae authored by Tetiana Chupryna's avatar Tetiana Chupryna Committed by Kamil Trzciński

Fix issue with displaying solution actions

parent b052295e
......@@ -15,7 +15,7 @@ module VulnerabilitiesHelper
new_issue_url: new_issue_url_for(vulnerability),
create_jira_issue_url: create_jira_issue_url_for(vulnerability),
related_jira_issues_path: project_integrations_jira_issues_path(vulnerability.project, vulnerability_ids: [vulnerability.id]),
has_mr: !!vulnerability.finding.merge_request_feedback.try(:merge_request_iid),
has_mr: !!vulnerability.finding.merge_request_feedback.try(:merge_request_id),
create_mr_url: create_vulnerability_feedback_merge_request_path(vulnerability.finding.project),
discussions_url: discussions_project_security_vulnerability_path(vulnerability.project, vulnerability),
notes_url: project_security_vulnerability_notes_path(vulnerability.project, vulnerability),
......
---
title: Fix issue with displaying solution actions
merge_request: 50648
author:
type: fixed
......@@ -144,6 +144,22 @@ RSpec.describe VulnerabilitiesHelper do
expect(subject[:pipeline]).to be_nil
end
end
describe '[:has_mr]' do
subject { helper.vulnerability_details(vulnerability, pipeline)[:has_mr] }
context 'with existing merge request feedback' do
before do
create(:vulnerability_feedback, :merge_request, project: project, pipeline: pipeline, project_fingerprint: finding.project_fingerprint)
end
it { is_expected.to be_truthy }
end
context 'without feedback' do
it { is_expected.to be_falsey }
end
end
end
describe '#create_jira_issue_url_for' 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