Fix current_patch_id_sha spec to work with factory default
What does this MR do and why?
In merge_request_spec.rb
, we keep the factory default for project
for all tests. MergeRequest#current_patch_id_sha
, will call
project.repository.get_patch_id
internally but we are stubbing
next instance of Repository
.
For it to work properly with factory default and other tests in
the spec file, we add message expectation on
merge_request.project.repository
instead as this ensures that
the project factory default was stubbed.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #429477 (closed)