Commit 76479cec authored by Douwe Maan's avatar Douwe Maan

Merge branch '2753-unable-to-rebase-unapproved-merge-request' into 'master'

Resolve "Unable to rebase unapproved merge request"

Closes #2753

See merge request !2273
parents cbc7db9b 3c7b2632
......@@ -15,7 +15,6 @@ module EE
def rebase
return access_denied! unless @merge_request.can_be_merged_by?(current_user)
return render_404 unless @merge_request.approved?
RebaseWorker.perform_async(@merge_request.id, current_user.id)
......
---
title: allow rebase for unapproved merge requests
merge_request:
author:
......@@ -371,12 +371,12 @@ describe Projects::MergeRequestsController do
context 'approvals pending' do
let(:project) { create(:project, approvals_before_merge: 1) }
it 'returns 404' do
expect_rebase_worker.never
it 'returns 200' do
expect_rebase_worker
post_rebase
expect(response.status).to eq(404)
expect(response.status).to eq(200)
end
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