change tests
This commit is contained in:
parent
1e65294212
commit
f13fc5660c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue