diff options
| author | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-05 18:37:44 +0100 |
|---|---|---|
| committer | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-06 17:02:30 +0100 |
| commit | f978a71f41d5546be2c0c6b33052979c06912bd1 (patch) | |
| tree | 9dc44e2dd44b1d27629a3a158eee6056fb551c13 /spec | |
| parent | 3f4e215c804f13def585dea995efa29b2af266ec (diff) | |
| download | gitlab-ce-f978a71f41d5546be2c0c6b33052979c06912bd1.tar.gz | |
Creating MR comment without a note returns status code 400 (Bad request)
Creating a comment to an existing merge request via API without providing a note
returns a status code 400 now, suggesting a bad request. The reason for this
is the resource itself (MR) exists but the required property is not set.
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/requests/api/merge_requests_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index bf87ecbdc6f..531b56b8e53 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -87,6 +87,11 @@ describe Gitlab::API do response.status.should == 201 json_response['note'].should == 'My comment' end + + it "should return 400 if note is missing" do + post api("/projects/#{project.id}/merge_request/#{merge_request.id}/comments", user) + response.status.should == 400 + end end end |
