diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-10-15 15:56:43 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-10-15 15:56:43 +0200 |
commit | 353ddbc7958d55262233c850fd2af2d2df027863 (patch) | |
tree | bb004878b81da1aa5008124b416c34871eddc1b1 /spec/requests | |
parent | 0d09b5fefc635120cf6e4234a401028f815fb326 (diff) | |
parent | 2df573dac3859034fcb90566a8ebc270a7e6088a (diff) | |
download | gitlab-ce-353ddbc7958d55262233c850fd2af2d2df027863.tar.gz |
Merge branch 'stanhu/gitlab-ce-fix-api-mr-comment-notifications'
Diffstat (limited to 'spec/requests')
-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 35b3d3e296a..a68c7b1e461 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -379,9 +379,14 @@ describe API::API, api: true do describe "POST /projects/:id/merge_request/:merge_request_id/comments" do it "should return comment" do + original_count = merge_request.notes.size + post api("/projects/#{project.id}/merge_request/#{merge_request.id}/comments", user), note: "My comment" expect(response.status).to eq(201) expect(json_response['note']).to eq('My comment') + expect(json_response['author']['name']).to eq(user.name) + expect(json_response['author']['username']).to eq(user.username) + expect(merge_request.notes.size).to eq(original_count + 1) end it "should return 400 if note is missing" do |