From 102f58495705821b5fabf07cc6ea18dfbe83cfc3 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 27 Nov 2014 18:26:05 -0300 Subject: [PATCH] add tests to sentTs --- test/Wallet.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/Wallet.js b/test/Wallet.js index 559793b92..bbef0644d 100644 --- a/test/Wallet.js +++ b/test/Wallet.js @@ -903,12 +903,15 @@ describe('Wallet model', function() { it('should broadcast a TX', function(done) { var w = createW2(null, 1); var utxo = createUTXO(w); + var now = Date.now(); var txp = w._createTxProposal(PP.outs[0].address, PP.outs[0].amountSatStr, 'hola', utxo); var ntxid = w.txProposals.add(txp); sinon.stub(w.blockchain, 'broadcast').yields(null, 1234); w.issueTx(ntxid, function(err, txid, status) { should.not.exist(err); + txp.getSent().should.be.above(now-1); + txp.sentTxid.should.be.equal(txid); txid.should.equal(1234); status.should.equal(Wallet.TX_BROADCASTED); done();