Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-03-02 10:29:04 +0300
committerStan Hu <stanhu@gmail.com>2019-03-02 17:31:09 +0300
commitb6a972787048a2ab9024051ecfe40f1a46bcc67d (patch)
tree94f1db9a8bcd3533ff8e5e0f05a27f4f702b40de /spec/services
parent5c9aa45489aee7cd1edaa15a30fb8a3aa24417a8 (diff)
Show pre-receive error message in merge request widget
When a merge fails due to a locked file, no feedback was given to the user as to why it failed if the user used the Merge button. However, if the push attempt happened directly in the Web UI, the pre-receive message would be displayed. To be consistent and to make it clear why a merge failed, we now include the pre-receive error message in the merge request widget. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/10165
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/merge_requests/merge_service_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/services/merge_requests/merge_service_spec.rb b/spec/services/merge_requests/merge_service_spec.rb
index ede79b87bcc..9d674263259 100644
--- a/spec/services/merge_requests/merge_service_spec.rb
+++ b/spec/services/merge_requests/merge_service_spec.rb
@@ -244,7 +244,7 @@ describe MergeRequests::MergeService do
service.execute(merge_request)
- expect(merge_request.merge_error).to include('Something went wrong during merge pre-receive hook')
+ expect(merge_request.merge_error).to include("Something went wrong during merge pre-receive hook: #{error_message}")
expect(Rails.logger).to have_received(:error).with(a_string_matching(error_message))
end