diff options
author | 🙈 jacopo beschi 🙉 <intrip@gmail.com> | 2018-09-11 22:02:09 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-09-11 22:02:09 +0000 |
commit | f2747f1ce0e07c2b6f1d96ff104660575f835e67 (patch) | |
tree | 37bdbb9bfdd6734d54a704a81e06eb0d844537a2 /spec/requests/api | |
parent | 099e404a2bbbf8b34c3e3bca29929828da36ecdb (diff) | |
download | gitlab-ce-f2747f1ce0e07c2b6f1d96ff104660575f835e67.tar.gz |
Resolve "500 Internal Server Error: Cherrypick commit with empty branch name"
Diffstat (limited to 'spec/requests/api')
-rw-r--r-- | spec/requests/api/commits_spec.rb | 8 |
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' } |