Fix Projects::MergeRequests::DiffsController specs
What does this MR do?
Fix Projects::MergeRequests::DiffsController specs
These specs were flaky and only passing after a retry due to how
rspec-retry works.
1. The test with paths that don't exist was returning 200 on the first try,
then 404 on the second, but not because the paths don't exist, but
because the MR IID didn't change, thus the MR couldn't be found.
I decided to remove the test entorely since we don't seem to return 404
for paths that don't exist.
2. The test with a user that cannot view the merge request was passing
the first time because the project owner wasn't removed with
`project.team.truncate`.
Changing the `let(:user)` to `create(:user)` and calling
`project.add_maintainer(user)` in the `before` block fix the test.
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Security reports checked/validated by reviewer