Skip to content

Remove requirement proxy object factory

Felipe Artur requested to merge issue_375163 into master

What does this MR do and why?

Requirements are now work-items(issues), we kept old objects to act as a proxy for preserving iid and endpoints still valid.

Given that all work-items of type requirement must have a requirement a proxy object associated and this object will only be used for read-only purposes, We can remove :requirement factory on specs to prevent its usage.

Some specs still need to have an object of type Requirement to properly pass,
these will most likely be removed or moved into other specs in the future, in these cases, we can use the regular :work_item with the following:

Instead of using :requirement factory

let(:requirement) { create(:requirement, project: project) }

We create a work item of type requirement and return the proxy object

let(:requirement) { create(:work_item, :requirement, project: project).requirement }

In a follow-up, we could also remove the :requirement_issue spec.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Felipe Artur

Merge request reports