fix assert is not defined issue
This commit is contained in:
parent
e2c15fe558
commit
a724649f30
|
@ -1146,8 +1146,8 @@ describe('Key', function() {
|
||||||
|
|
||||||
it('Throw user friendly error when reformatting encrypted key', () => {
|
it('Throw user friendly error when reformatting encrypted key', () => {
|
||||||
return openpgp.generateKey({numBits: 1024, userIds: 'test1 <a@b.com>', passphrase: '1234'}).then(function(original) {
|
return openpgp.generateKey({numBits: 1024, userIds: 'test1 <a@b.com>', passphrase: '1234'}).then(function(original) {
|
||||||
return openpgp.reformatKey({privateKey: original.key, userIds: 'test2 <b@a.com>', passphrase: '1234'}).then(function(newKey) {
|
return openpgp.reformatKey({privateKey: original.key, userIds: 'test2 <b@a.com>', passphrase: '1234'}).then(function() {
|
||||||
assert.fail('reformatKey should result in error when key not decrypted');
|
throw new Error('reformatKey should result in error when key not decrypted');
|
||||||
}).catch(function(error) {
|
}).catch(function(error) {
|
||||||
expect(error.message).to.equal('Error reformatting keypair: Key not decrypted');
|
expect(error.message).to.equal('Error reformatting keypair: Key not decrypted');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user