This commit is contained in:
Matias Alejo Garcia 2014-10-21 09:57:54 -03:00
commit 39e85396db
7 changed files with 123 additions and 42 deletions

View file

@ -419,6 +419,15 @@ describe('Storage model', function() {
var wo = s.decrypt(encryptedLegacy1);
should.not.exist(wo);
});
it('should call save / restorePassphrase', function() {
var wo = s.decrypt(encryptedLegacy1, 'xxx');
s.savePassphrase.calledOnce.should.equal(true);
s.restorePassphrase.calledOnce.should.equal(true);
should.not.exist(wo);
});
it('should be able to decrypt an old backup', function() {
s._setPassphrase(legacyPassword1);