Commit f84d84622393223e40dd9533f86266d5f377f881
1 parent
7e14f86c
Exists in
spb-stable
and in
3 other branches
Added tests of Create and Update MR description.
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
spec/requests/api/merge_requests_spec.rb
... | ... | @@ -92,9 +92,10 @@ describe API::API do |
92 | 92 | |
93 | 93 | it "should return merge_request" do |
94 | 94 | post api("/projects/#{fork_project.id}/merge_requests", user2), |
95 | - title: 'Test merge_request', source_branch: "stable", target_branch: "master", author: user2, target_project_id: project.id | |
95 | + title: 'Test merge_request', source_branch: "stable", target_branch: "master", author: user2, target_project_id: project.id, description: 'Test description for Test merge_request' | |
96 | 96 | response.status.should == 201 |
97 | 97 | json_response['title'].should == 'Test merge_request' |
98 | + json_response['description'].should == 'Test description for Test merge_request' | |
98 | 99 | end |
99 | 100 | |
100 | 101 | it "should not return 422 when source_branch equals target_branch" do |
... | ... | @@ -168,6 +169,12 @@ describe API::API do |
168 | 169 | json_response['title'].should == 'New title' |
169 | 170 | end |
170 | 171 | |
172 | + it "should return merge_request" do | |
173 | + put api("/projects/#{project.id}/merge_request/#{merge_request.id}", user), description: "New description" | |
174 | + response.status.should == 200 | |
175 | + json_response['description'].should == 'New description' | |
176 | + end | |
177 | + | |
171 | 178 | it "should return 422 when source_branch and target_branch are renamed the same" do |
172 | 179 | put api("/projects/#{project.id}/merge_request/#{merge_request.id}", user), |
173 | 180 | source_branch: "master", target_branch: "master" | ... | ... |