summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-01-15 13:11:22 +0000
committerRobert Speicher <rspeicher@gmail.com>2018-01-15 13:37:34 -0600
commit09b07d8420e1102ac3fcfef1395f70439dcc6c76 (patch)
treed268c6d807d800730bfc55173e20c6fff59e3f18 /spec
parentf57dac49b5123199eda449e292eb9370dce003da (diff)
downloadgitlab-ce-09b07d8420e1102ac3fcfef1395f70439dcc6c76.tar.gz
Merge branch '42025-fix-issue-api' into 'master'10-4-stable-prepare-rc6
[API] Fix creating issue when assignee_id is empty See merge request gitlab-org/gitlab-ce!16458
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/api/issues_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb
index 320217f2032..43218755f4f 100644
--- a/spec/requests/api/issues_spec.rb
+++ b/spec/requests/api/issues_spec.rb
@@ -847,6 +847,15 @@ describe API::Issues, :mailer do
expect(json_response['assignee']['name']).to eq(user2.name)
expect(json_response['assignees'].first['name']).to eq(user2.name)
end
+
+ it 'creates a new project issue when assignee_id is empty' do
+ post api("/projects/#{project.id}/issues", user),
+ title: 'new issue', assignee_id: ''
+
+ expect(response).to have_gitlab_http_status(201)
+ expect(json_response['title']).to eq('new issue')
+ expect(json_response['assignee']).to be_nil
+ end
end
context 'single assignee restrictions' do