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:
author🙈 jacopo beschi 🙉 <intrip@gmail.com>2018-09-12 01:02:09 +0300
committerRobert Speicher <robert@gitlab.com>2018-09-12 01:02:09 +0300
commitf2747f1ce0e07c2b6f1d96ff104660575f835e67 (patch)
tree37bdbb9bfdd6734d54a704a81e06eb0d844537a2 /spec/requests/api/commits_spec.rb
parent099e404a2bbbf8b34c3e3bca29929828da36ecdb (diff)
Resolve "500 Internal Server Error: Cherrypick commit with empty branch name"
Diffstat (limited to 'spec/requests/api/commits_spec.rb')
-rw-r--r--spec/requests/api/commits_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb
index 246947e58a8..d5b31610dad 100644
--- a/spec/requests/api/commits_spec.rb
+++ b/spec/requests/api/commits_spec.rb
@@ -1040,6 +1040,14 @@ describe API::Commits do
end
end
+ context 'when branch is empty' do
+ ['', ' '].each do |branch|
+ it_behaves_like '400 response' do
+ let(:request) { post api(route, current_user), branch: branch }
+ end
+ end
+ end
+
context 'when branch does not exist' do
it_behaves_like '404 response' do
let(:request) { post api(route, current_user), branch: 'foo' }