settings: added test for new secret scheme
This commit is contained in:
parent
520fd762ba
commit
7159cdb712
4 changed files with 15 additions and 4 deletions
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue