Skip to content

Commit 035310a

Browse files
committed
Add test to 'Get single MR'.
1 parent 70a3055 commit 035310a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

test/merge_request.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*!
2+
* gitlab - test/merge_request.test.js
3+
* Copyright(c) 2012 fengmk2 <[email protected]>
4+
* MIT Licensed
5+
*/
6+
7+
"use strict";
8+
9+
/**
10+
* Module dependencies.
11+
*/
12+
13+
var client = require('./client');
14+
var should = require('should');
15+
16+
describe('merge_request.test.js', function() {
17+
18+
describe('client.merge_requests.get()', function() {
19+
20+
it('should return a merge_request', function(done) {
21+
client.merge_requests.get({
22+
id: 65,
23+
merge_request_id: 142
24+
}, function(err, row) {
25+
should.not.exists(err);
26+
row.id.should.equal(142);
27+
row.should.have.keys('id', 'iid', 'project_id', 'target_branch', 'source_branch',
28+
'title', 'state', 'upvotes', 'downvotes', 'description', 'author', 'assignee',
29+
'source_project_id', 'target_project_id');
30+
done();
31+
});
32+
});
33+
34+
});
35+
});

0 commit comments

Comments
 (0)