From f87bdea8fb4d7e3b3ab741d5e2d28d137034bdf6 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Fri, 15 Apr 2016 14:03:57 -0400 Subject: [PATCH] test: update status tests --- test/status.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/test/status.js b/test/status.js index 8b791d6..9c2119a 100644 --- a/test/status.js +++ b/test/status.js @@ -31,13 +31,9 @@ describe('Status', function() { var node = { services: { bitcoind: { - getInfo: sinon.stub().returns(info), - getBestBlockHash: sinon.stub().returns(outSetInfo.bestblock) - }, - db: { - tip: { - hash: outSetInfo.bestblock - } + getInfo: sinon.stub().callsArgWith(0, null, info), + getBestBlockHash: sinon.stub().callsArgWith(0, null, outSetInfo.bestblock), + tiphash: outSetInfo.bestblock } } }; @@ -118,15 +114,10 @@ describe('Status', function() { it('should have correct data', function(done) { var node = { services: { - db: { - tip: { - __height: 500000 - } - }, bitcoind: { height: 500000, - isSynced: sinon.stub().returns(true), - syncPercentage: sinon.stub().returns(99.99) + isSynced: sinon.stub().callsArgWith(0, null, true), + syncPercentage: sinon.stub().callsArgWith(0, null, 99.99) } } };