Commit 9eeaea5c authored by Alan (Maciej) Paruszewski's avatar Alan (Maciej) Paruszewski Committed by Rémy Coutable

Add path helper method for vulnerability todo

parent f6c8c45d
......@@ -42,6 +42,10 @@ module EE
project_security_vulnerability_path(entity.project, entity, *args)
end
def project_vulnerability_path(project, vulnerability, *args)
project_security_vulnerability_path(project, vulnerability, *args)
end
def upgrade_plan_path(group)
return profile_billings_path if group.blank?
......
---
title: Add missing path to project vulnerability
merge_request: 40935
author:
type: fixed
......@@ -11,6 +11,17 @@ RSpec.describe ::TodosHelper do
end
end
describe '#todo_target_path' do
context 'when target is vulnerability' do
let(:vulnerability) { create(:vulnerability) }
let(:todo) { create(:todo, target: vulnerability, project: vulnerability.project) }
subject(:todo_target_path) { helper.todo_target_path(todo) }
it { is_expected.to eq("/#{todo.project.full_path}/-/security/vulnerabilities/#{todo.target.id}") }
end
end
describe '#todo_author_display?' do
using RSpec::Parameterized::TableSyntax
......
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