Fix places in merge_request_spec.rb that persist changes to the project
What does this MR do?
This MR applies the method in !39996 (diffs, comment 402591440) to other places in merge_request_spec.rb
where subject.project
is mutated.
This is necessary because of the create_default
that is applied to projects within this spec causing the same project to be used whenever a project factory is required. For any parts of this spec where the merge request project is mutated, we need to be careful to create a new project to avoid having this change affect other tests.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Luke Duncalfe