From f13fc5660c6ba054f89f5eb042908fca71a703b5 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Fri, 20 Mar 2015 16:46:33 -0300 Subject: [PATCH] change tests --- test/integration/server.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/test/integration/server.js b/test/integration/server.js index 433615f..e85dfb8 100644 --- a/test/integration/server.js +++ b/test/integration/server.js @@ -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);