Add tests for VulnerabilityPresenter
Proposal
VulnerabilityPresenter
(ee/app/presenters/vulnerability_presenter.rb
) does not have an associated spec
file. Write tests for the methods in the presenter. This has actually caused headaches a few times (at least for me) because there's edge cases that don't get checked. These tests can be added for each method or in groups to allow this issue to be iterated through.
Updated status
We have now associated spec file, but we are missing specs for couple of methods.
Implementation plan:
-
backend Add specs for #links and #location_text in https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/spec/presenters/vulnerability_presenter_spec.rb
Edited by Subashis Chakraborty