diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-02-02 22:08:10 +0100 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-02-04 10:24:25 +0100 |
commit | b60d06eb2c91a61b91a214dac0f0f526b146f8d7 (patch) | |
tree | 9f3070d6e3d9a0a4b208715c962dcc43bf3e65e5 /spec | |
parent | c0acb28c4ec710c90eb55dc996251a30001c8e79 (diff) | |
download | gitlab-ce-b60d06eb2c91a61b91a214dac0f0f526b146f8d7.tar.gz |
Added a way to retrieve MR files
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/merge_requests_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 5ba3a330991..5795082f5cb 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -114,6 +114,19 @@ describe API::API, api: true do end end + describe 'GET /projects/:id/merge_request/:merge_request_id/changes' do + it 'should return the change information of the merge_request' do + get api("/projects/#{project.id}/merge_request/#{merge_request.id}/changes", user) + expect(response.status).to eq 200 + expect(json_response['changes'].size).to eq(merge_request.diffs.size) + end + + it 'returns a 404 when merge_request_id not found' do + get api("/projects/#{project.id}/merge_request/999/changes", user) + expect(response.status).to eq(404) + end + end + describe "POST /projects/:id/merge_requests" do context 'between branches projects' do it "should return merge_request" do |