Browse Source

change tests

activeAddress
Ivan Socolsky 10 years ago
parent
commit
f13fc5660c
  1. 22
      test/integration/server.js

22
test/integration/server.js

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

Loading…
Cancel
Save