diff options
author | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-20 12:43:32 +0100 |
---|---|---|
committer | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-20 12:43:32 +0100 |
commit | eefb27f5ae0edf0c005eb8ce6da56cbd17c9aa8a (patch) | |
tree | 9dc7d17953ee7851e1934903b45faf5f18d860a2 /spec/requests/api/merge_requests_spec.rb | |
parent | 1b97a2eee8b89320de891e3ae8496adfa7f3a84b (diff) | |
parent | b7ac654b88aa9b03f431d93c25e397ff2bc66a7a (diff) | |
download | gitlab-ce-eefb27f5ae0edf0c005eb8ce6da56cbd17c9aa8a.tar.gz |
Merge branch 'master' into fixes/api
Conflicts:
spec/requests/api/projects_spec.rb
Diffstat (limited to 'spec/requests/api/merge_requests_spec.rb')
-rw-r--r-- | spec/requests/api/merge_requests_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 431aae7cc11..8de06c33394 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -66,6 +66,23 @@ describe Gitlab::API do end end + describe "PUT /projects/:id/merge_request/:merge_request_id to close MR" do + it "should return merge_request" do + put api("/projects/#{project.id}/merge_request/#{merge_request.id}", user), state_event: "close" + response.status.should == 200 + json_response['state'].should == 'closed' + end + end + + describe "PUT /projects/:id/merge_request/:merge_request_id to merge MR" do + it "should return merge_request" do + put api("/projects/#{project.id}/merge_request/#{merge_request.id}", user), state_event: "merge" + response.status.should == 200 + json_response['state'].should == 'merged' + end + end + + describe "PUT /projects/:id/merge_request/:merge_request_id" do it "should return merge_request" do put api("/projects/#{project.id}/merge_request/#{merge_request.id}", user), title: "New title" |