Commit dfbfe5d0 authored by Felipe Artur's avatar Felipe Artur

Fix conflict in merge_service_spec.rb

parent cc9d3617
...@@ -249,7 +249,6 @@ describe MergeRequests::MergeService do ...@@ -249,7 +249,6 @@ describe MergeRequests::MergeService do
expect(Rails.logger).to have_received(:error).with(a_string_matching(error_message)) expect(Rails.logger).to have_received(:error).with(a_string_matching(error_message))
end end
<<<<<<< HEAD
context 'when squashing' do context 'when squashing' do
before do before do
merge_request.update!(source_branch: 'master', target_branch: 'feature') merge_request.update!(source_branch: 'master', target_branch: 'feature')
...@@ -357,29 +356,6 @@ describe MergeRequests::MergeService do ...@@ -357,29 +356,6 @@ describe MergeRequests::MergeService do
expect(service.hooks_validation_pass?(merge_request)).to be_truthy expect(service.hooks_validation_pass?(merge_request)).to be_truthy
end end
=======
context "when fast-forward merge is not allowed" do
before do
allow_any_instance_of(Repository).to receive(:ancestor?).and_return(nil)
end
%w(semi-linear ff).each do |merge_method|
it "logs and saves error if merge is #{merge_method} only" do
merge_method = 'rebase_merge' if merge_method == 'semi-linear'
merge_request.project.update(merge_method: merge_method)
error_message = 'Only fast-forward merge is allowed for your project. Please update your source branch'
allow(service).to receive(:execute_hooks)
service.execute(merge_request)
expect(merge_request).to be_open
expect(merge_request.merge_commit_sha).to be_nil
expect(merge_request.merge_error).to include(error_message)
expect(Rails.logger).to have_received(:error).with(a_string_matching(error_message))
end
end
end
>>>>>>> ce-com/master
end end
end end
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