add sinon for fromObj
This commit is contained in:
parent
cbc46f5345
commit
1dd906afcd
4 changed files with 356 additions and 43 deletions
|
|
@ -228,8 +228,8 @@ describe('Identity model', function() {
|
|||
describe.only('#importWallet', function() {
|
||||
it('should create wallet from encrypted object', function() {
|
||||
iden.storage.setPassphrase = sinon.spy();
|
||||
iden.storage.decrypt = sinon.stub().withArgs('base64').returns('walletObj');
|
||||
iden.fromObj = sinon.stub().withArgs('walletObj').returns('ok');
|
||||
iden.storage.decrypt = sinon.stub().withArgs('base64').returns({networkName:'testnet'});
|
||||
Identity._walletFromObj = sinon.stub().withArgs('walletObj').returns('ok');
|
||||
|
||||
var w = iden.importWallet("encrypted object", "123");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue