mirror of https://github.com/BTCPrivate/copay.git
fix getEncryptedObj test
getEncryptedObj doesn't even exist any more. I remove the test for that function, and add a test for the new function, export, which replaces it.
This commit is contained in:
parent
1d8559237e
commit
c2ea0b79c2
|
@ -46,13 +46,13 @@ if (typeof process === 'undefined' || !process.version) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('#getEncryptedObj', function() {
|
describe('#export', function() {
|
||||||
it('should encrypt the wallet', function() {
|
it('should export the encrypted wallet', function() {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
var storage = new LocalEncrypted({password: 'password'});
|
var storage = new LocalEncrypted({password: 'password'});
|
||||||
storage.set('walletId', 'test', 'testval');
|
storage.set('walletId', 'test', 'testval');
|
||||||
var obj = {test:'testval'};
|
var obj = {test:'testval'};
|
||||||
var encrypted = storage.getEncryptedObj('walletId');
|
var encrypted = storage.export(obj);
|
||||||
encrypted.length.should.be.greaterThan(10);
|
encrypted.length.should.be.greaterThan(10);
|
||||||
//encrypted.slice(0,6).should.equal("53616c");
|
//encrypted.slice(0,6).should.equal("53616c");
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue