From ede5f0b60c1662f71af964b95eaf5b20ddcca176 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Fri, 13 Mar 2015 23:29:26 -0400 Subject: [PATCH] add test for seed event, and remove test stubs --- test/messages/index.js | 10 ---------- test/pool.js | 13 +++++++++++-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/test/messages/index.js b/test/messages/index.js index bf1f14b..a2b3aa8 100644 --- a/test/messages/index.js +++ b/test/messages/index.js @@ -78,14 +78,4 @@ describe('Messages', function() { }); - describe('#discardUntilNextMessage', function() { - }); - - describe('#buildFromBuffer', function() { - }); - - describe('#build/#buildFromObject', function() { - }); - - }); diff --git a/test/pool.js b/test/pool.js index 44bcfa0..011fd22 100644 --- a/test/pool.js +++ b/test/pool.js @@ -336,8 +336,17 @@ describe('Pool', function() { pool.connect(); }); - it('not call _fillConnections if keepalive is false', function(done) { - done(); + it('not call _fillConnections if keepalive is false on seed', function(done) { + var pool = new Pool({network: Networks.livenet, maxSize: 1}); + pool._fillConnections = sinon.stub(); + pool.keepalive = false; + pool.on('seed', function() { + process.nextTick(function() { + pool._fillConnections.called.should.equal(false); + done(); + }); + }); + pool.emit('seed', []); }); it('keep original time for handling peeraddr messages', function(done) {