Commit b6384727 authored by Abdul Wadood's avatar Abdul Wadood

Use admin user fork project specs in merge_requests_controller_spec.rb

To fix: "Validation failed: Members and requesters is invalid".
parent ffa44560
......@@ -53,6 +53,7 @@ RSpec.describe Projects::MergeRequestsController do
let_it_be_with_refind(:project) { create(:project, :repository) }
let_it_be(:author) { create(:user) }
let_it_be(:owner) { create(:admin) }
let(:merge_request) { create(:merge_request_with_diffs, source_project: project, author: author) }
let(:user) { project.creator }
......@@ -313,7 +314,8 @@ RSpec.describe Projects::MergeRequestsController do
let(:merge_request) { create(:merge_request, title: 'This is targeting the fork', source_project: project, target_project: project) }
before do
project.add_developer(user)
sign_in(owner)
project.add_developer(owner)
project.update!(approvals_before_merge: 0)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment