From d57e5e73e7feb94d5bf8fa083215d2360f82c456 Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Wed, 10 Sep 2014 14:01:10 -0700 Subject: [PATCH] settings: fix tests 3 --- js/models/core/WalletFactory.js | 2 +- test/test.WalletFactory.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/models/core/WalletFactory.js b/js/models/core/WalletFactory.js index 767f5f290..33d763451 100644 --- a/js/models/core/WalletFactory.js +++ b/js/models/core/WalletFactory.js @@ -339,7 +339,7 @@ WalletFactory.prototype.decodeSecret = function(secret) { WalletFactory.prototype.joinCreateSession = function(secret, nickname, passphrase, privateHex, cb) { var self = this; var decodedSecret = this.decodeSecret(secret); - if (!decodedSecret || !decodedSecret.networkName || !decodedSecret.pubkey) { + if (!decodedSecret || !decodedSecret.networkName || !decodedSecret.pubKey) { return cb('badSecret'); } diff --git a/test/test.WalletFactory.js b/test/test.WalletFactory.js index 1ed6b3bd1..e0f90281d 100644 --- a/test/test.WalletFactory.js +++ b/test/test.WalletFactory.js @@ -411,15 +411,15 @@ describe('WalletFactory model', function() { var wf = new WalletFactory(config, '0.0.1'); wf.networks.testnet.cleanUp = sinon.spy(); wf.networks.testnet.start = sinon.spy(); - wf.joinCreateSession('8WtTuiFTkhP5ao7AF2QErSwV39Cbur6pdMebKzQXFqL59RscXM', 'test'); - wf.network.start.calledOnce.should.equal(true); + wf.joinCreateSession('CA1e4HJpSmx9i97i2NigZ6j6F8C5pSaZX9XrAUwQERYAxNpQ4jsBEkr8iS', 'test'); + wf.networks.testnet.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.joinCreateSession('CA1e4HJpSmx9i97i2NigZ6j6F8C5pSaZX9XrAUwQERYAxNpQ4jsBEkr8iS', 'test', null, privHex); wf.network.start.getCall(0).args[0].privkey.should.equal('ddc2fa8c583a73c4b2a24630ec7c283df4e7c230a02c4e48bc36ec61687afd7d'); }); it('should call network.start with private key', function() {