diff options
author | Rémy Coutable <remy@rymai.me> | 2019-02-14 18:52:42 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-02-18 14:13:08 +0300 |
commit | 45ce5ff7ea19254b16a721329820712d68886298 (patch) | |
tree | 2604ffa2210655f2c6e2e2fe4010d81ba1717172 /app | |
parent | 5dede999835c00f8be9b93ddb8d6fb5835357aa9 (diff) |
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, 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 entirely 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 failing
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.
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/merge_requests/diffs_controller.rb | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/app/controllers/projects/merge_requests/diffs_controller.rb b/app/controllers/projects/merge_requests/diffs_controller.rb index ddffbb17ace..518d41bd3fb 100644 --- a/app/controllers/projects/merge_requests/diffs_controller.rb +++ b/app/controllers/projects/merge_requests/diffs_controller.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true class Projects::MergeRequests::DiffsController < Projects::MergeRequests::ApplicationController - include DiffForPath include DiffHelper include RendersNotes |