change tests

This commit is contained in:
Ivan Socolsky 2015-03-20 16:46:33 -03:00
parent 1e65294212
commit f13fc5660c
1 changed files with 15 additions and 7 deletions

View File

@ -2347,34 +2347,42 @@ describe('Copay server', function() {
});
it('should get various paginated tx history', function(done) {
var testCases = [{
opts: {},
expected: [50, 40, 30, 20, 10],
}, {
opts: {
minTs: 15,
maxTs: 45,
skip: 1,
limit: 3,
},
expected: [40, 30, 20],
}, {
opts: {
minTs: 15,
maxTs: 45,
skip: 1,
limit: 2,
},
expected: [40, 30],
}, {
opts: {
maxTs: 35,
skip: 2,
},
expected: [30, 20, 10],
}, {
opts: {
minTs: 15,
limit: 4,
},
expected: [50, 40, 30, 20],
}, {
opts: {
minTs: 15,
skip: 0,
limit: 3,
},
expected: [50, 40, 30],
}, {
opts: {
skip: 0,
limit: 0,
},
expected: [],
}];
server._normalizeTxHistory = sinon.stub().returnsArg(0);