summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-15 15:56:43 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-10-15 15:56:43 +0200
commit353ddbc7958d55262233c850fd2af2d2df027863 (patch)
treebb004878b81da1aa5008124b416c34871eddc1b1 /spec/requests
parent0d09b5fefc635120cf6e4234a401028f815fb326 (diff)
parent2df573dac3859034fcb90566a8ebc270a7e6088a (diff)
downloadgitlab-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.rb5
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