diff options
author | Greg Messner <greg@messners.com> | 2014-03-10 23:39:29 +0400 |
---|---|---|
committer | Greg Messner <greg@messners.com> | 2014-03-10 23:39:29 +0400 |
commit | f84d84622393223e40dd9533f86266d5f377f881 (patch) | |
tree | 74d3903573cef248b8456d9270ee1e2a94f882f3 /spec/requests | |
parent | 7e14f86c71b8b2f94ad65cae6118f752c8f31610 (diff) |
Added tests of Create and Update MR description.
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/merge_requests_spec.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 412b6c95ffa..1a9e4809e7d 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -92,9 +92,10 @@ describe API::API do it "should return merge_request" do post api("/projects/#{fork_project.id}/merge_requests", user2), - title: 'Test merge_request', source_branch: "stable", target_branch: "master", author: user2, target_project_id: project.id + title: 'Test merge_request', source_branch: "stable", target_branch: "master", author: user2, target_project_id: project.id, description: 'Test description for Test merge_request' response.status.should == 201 json_response['title'].should == 'Test merge_request' + json_response['description'].should == 'Test description for Test merge_request' end it "should not return 422 when source_branch equals target_branch" do @@ -168,6 +169,12 @@ describe API::API do json_response['title'].should == 'New title' end + it "should return merge_request" do + put api("/projects/#{project.id}/merge_request/#{merge_request.id}", user), description: "New description" + response.status.should == 200 + json_response['description'].should == 'New description' + end + it "should return 422 when source_branch and target_branch are renamed the same" do put api("/projects/#{project.id}/merge_request/#{merge_request.id}", user), source_branch: "master", target_branch: "master" |