settings: added test for new secret scheme

This commit is contained in:
Manuel Araoz 2014-09-09 17:08:59 -07:00
commit 7159cdb712
4 changed files with 15 additions and 4 deletions

View file

@ -362,7 +362,18 @@ describe('Wallet model', function() {
var s = Wallet.decodeSecret(sb);
s.pubKey.should.equal(id);
s.secretNumber.should.equal(secretNumber);
s.networkName.should.equal(w.getNetworkName());
});
it('#getSecret decodeSecret livenet', function() {
var w = cachedCreateW2();
var stub = sinon.stub(w, 'getNetworkName');
stub.returns('livenet');
var sb = w.getSecret();
should.exist(sb);
var s = Wallet.decodeSecret(sb);
s.networkName.should.equal('livenet');
stub.restore();
});