diff --git a/test/test.WalletFactory.js b/test/test.WalletFactory.js index 47a1ab9b8..419d2ffcc 100644 --- a/test/test.WalletFactory.js +++ b/test/test.WalletFactory.js @@ -404,9 +404,17 @@ describe('WalletFactory model', function() { var wf = new WalletFactory(config, '0.0.1'); wf.network.cleanUp = sinon.spy(); wf.network.start = sinon.spy(); - wf.joinCreateSession('8WtTuiFTkhP5ao7AF2QErSwV39Cbur6pdMebKzQXFqL59RscXM', 'test', null, undefined); + wf.joinCreateSession('8WtTuiFTkhP5ao7AF2QErSwV39Cbur6pdMebKzQXFqL59RscXM', 'test'); wf.network.start.calledOnce.should.equal(true); }); + it('should accept a priv key a input', function() { + var wf = new WalletFactory(config, '0.0.1'); + var privHex = 'tprv8ZgxMBicQKsPf7MCvCjnhnr4uiR2Z2gyNC27vgd9KUu98F9mM1tbaRrWMyddVju36GxLbeyntuSadBAttriwGGMWUkRgVmUUCg5nFioGZsd'; + wf.network.cleanUp = sinon.spy(); + wf.network.start = sinon.spy(); + wf.joinCreateSession('8WtTuiFTkhP5ao7AF2QErSwV39Cbur6pdMebKzQXFqL59RscXM', 'test', null, privHex); + wf.network.start.getCall(0).args[0].privkey.should.equal('ddc2fa8c583a73c4b2a24630ec7c283df4e7c230a02c4e48bc36ec61687afd7d'); + }); it('should call network.start with private key', function() { var wf = new WalletFactory(config, '0.0.1'); wf.network.cleanUp = sinon.spy();