diff options
author | Stan Hu <stanhu@gmail.com> | 2015-10-09 09:14:35 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-10-10 10:59:02 -0700 |
commit | 2df573dac3859034fcb90566a8ebc270a7e6088a (patch) | |
tree | d3d344939b9cf8c50908ac87f1bdce3b7a1d316b /spec/requests | |
parent | c99e9edce7fa71ad53cb35e3bac2afe4646d1ebd (diff) | |
download | gitlab-ce-2df573dac3859034fcb90566a8ebc270a7e6088a.tar.gz |
Fix bug where merge request comments created by API would not trigger notifications
Closes https://github.com/gitlabhq/gitlabhq/issues/9715
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 |