From f1a9f6d06685464ee533d6b5ea0530ee310d5cd3 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Mon, 23 May 2016 15:58:54 -0400 Subject: [PATCH] test: stub logging in bitcoind tests --- test/services/bitcoind.unit.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/services/bitcoind.unit.js b/test/services/bitcoind.unit.js index 68306bcc..59964ed8 100644 --- a/test/services/bitcoind.unit.js +++ b/test/services/bitcoind.unit.js @@ -193,6 +193,13 @@ describe('Bitcoin Service', function() { }); describe('#subscribeAddress', function() { + var sandbox = sinon.sandbox.create(); + beforeEach(function() { + sandbox.stub(log, 'info'); + }); + afterEach(function() { + sandbox.restore(); + }); it('will not an invalid address', function() { var bitcoind = new BitcoinService(baseConfig); var emitter = new EventEmitter(); @@ -225,6 +232,13 @@ describe('Bitcoin Service', function() { }); describe('#unsubscribeAddress', function() { + var sandbox = sinon.sandbox.create(); + beforeEach(function() { + sandbox.stub(log, 'info'); + }); + afterEach(function() { + sandbox.restore(); + }); it('it will remove a subscription', function() { var bitcoind = new BitcoinService(baseConfig); var emitter1 = new EventEmitter(); @@ -285,6 +299,13 @@ describe('Bitcoin Service', function() { }); describe('#unsubscribeAddressAll', function() { + var sandbox = sinon.sandbox.create(); + beforeEach(function() { + sandbox.stub(log, 'info'); + }); + afterEach(function() { + sandbox.restore(); + }); it('will unsubscribe emitter for all addresses', function() { var bitcoind = new BitcoinService(baseConfig); var emitter1 = new EventEmitter();