add test for seed event, and remove test stubs

This commit is contained in:
Braydon Fuller 2015-03-13 23:29:26 -04:00
parent e62ddd93f6
commit ede5f0b60c
2 changed files with 11 additions and 12 deletions

View File

@ -78,14 +78,4 @@ describe('Messages', function() {
});
describe('#discardUntilNextMessage', function() {
});
describe('#buildFromBuffer', function() {
});
describe('#build/#buildFromObject', function() {
});
});

View File

@ -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) {