From 8945b59fd4d36a53a676341cb728b37fb09771f8 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 12 Feb 2015 11:41:14 -0300 Subject: [PATCH] add server to check ts is in epoch --- test/integration.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/integration.js b/test/integration.js index 6d24daf..66a6d55 100644 --- a/test/integration.js +++ b/test/integration.js @@ -1208,6 +1208,21 @@ describe('Copay server', function() { }); }); + it('should pull the last 5 notifications, using now', function(done) { + server.getNotifications({ + limit: 5, + reverse: true, + maxTs: Date.now()/1000, + minTs: Date.now()/1000-1000, + }, function(err, notifications) { + should.not.exist(err); + var types = _.pluck(notifications, 'type'); + types.should.deep.equal(['NewTxProposal', 'NewTxProposal', 'NewTxProposal', 'NewAddress', 'NewAddress']); + done(); + }); + }); + + it('should pull the first 5 notifications after wallet creation', function(done) {