Commit f84d8462 authored by Greg Messner's avatar Greg Messner

Added tests of Create and Update MR description.

parent 7e14f86c
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment