From e8c9da46b6844f244ed78b86b3200a4fed0630e1 Mon Sep 17 00:00:00 2001 From: Josh Harvey Date: Thu, 19 Mar 2015 16:10:57 -0400 Subject: [PATCH] fix tests --- test/mocks/db.js | 6 +++++- test/mocks/info.js | 3 ++- test/mocks/wallet.js | 2 -- test/plugins.js | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/test/mocks/db.js b/test/mocks/db.js index dfbd2eeb..66ca37e7 100644 --- a/test/mocks/db.js +++ b/test/mocks/db.js @@ -29,7 +29,11 @@ module.exports = { completeTransaction: function(tx, txHash) { calls.status = true; }, - recordBill: function(fingerprint, trade) { } + recordBill: function(fingerprint, trade) { }, + addOutgoingTx: function(session, tx, cb) { + cb(null, {satoshis: tx.satoshis}); + }, + sentCoins: function() {} }; diff --git a/test/mocks/info.js b/test/mocks/info.js index 9aeb14b4..ba96e4cb 100644 --- a/test/mocks/info.js +++ b/test/mocks/info.js @@ -6,5 +6,6 @@ module.exports = { config: function config() {}, getAddressLastTx: function verifyUser() {}, - getTx: function verifyTransaction() {} + getTx: function verifyTransaction() {}, + checkAddress: function checkAddress() {} }; diff --git a/test/mocks/wallet.js b/test/mocks/wallet.js index 28882ca5..ed73e2ae 100644 --- a/test/mocks/wallet.js +++ b/test/mocks/wallet.js @@ -42,5 +42,3 @@ module.exports.getBalanceCalls = function() { module.exports.wasSendCalled = function() { return calls.send; }; - - diff --git a/test/plugins.js b/test/plugins.js index c1761e89..bf8aeaa4 100644 --- a/test/plugins.js +++ b/test/plugins.js @@ -209,7 +209,7 @@ describe('Plugins', function() { /* jshint expr: true */ response.should.be.an.Object; response.should.have.property('statusCode'); - response.statusCode.should.equal(204); + response.statusCode.should.equal(201); /* jshint expr: false */ done();