Commit 80e41630 authored by leiminghuan's avatar leiminghuan

refactor the condition to before block.

parent 460d3823
......@@ -1637,8 +1637,11 @@ describe API::MergeRequests do
context "performing a ff-merge with squash" do
let(:merge_request) { create(:merge_request, :rebased, source_project: project, squash: true) }
it "records the squash commit SHA and returns it in the response" do
before do
project.update(merge_requests_ff_only_enabled: true)
end
it "records the squash commit SHA and returns it in the response" do
put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user)
expect(response).to have_gitlab_http_status(200)
......
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