aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Brunschwig <[email protected]>2022-01-01 18:05:53 +0100
committerPatrick Brunschwig <[email protected]>2022-01-01 18:05:53 +0100
commit6480d0395866e6237a5d777b06952d1f87578f1c (patch)
treef19c5d7181b2cacd3a489e6d19f064fb32cd6ccb
parent51be0d53d68035f093842512e073e43778a7b583 (diff)
downloadenigmail-6480d0395866e6237a5d777b06952d1f87578f1c.tar.gz
enigmail-6480d0395866e6237a5d777b06952d1f87578f1c.tar.bz2
enigmail-6480d0395866e6237a5d777b06952d1f87578f1c.zip
fixed expiry test cases
-rw-r--r--package/tests/pgpjs-keys-test.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/package/tests/pgpjs-keys-test.js b/package/tests/pgpjs-keys-test.js
index f44eadc5..b3384d53 100644
--- a/package/tests/pgpjs-keys-test.js
+++ b/package/tests/pgpjs-keys-test.js
@@ -25,11 +25,10 @@ test(withTestGpgHome(asyncTest(async function genKey() {
Assert.equal(key.users[0].userID.userID, "Someone <[email protected]>");
Assert.ok(keyData.privateKey.indexOf("PGP PRIVATE KEY") > 0);
Assert.ok(keyData.revocationCertificate.indexOf("PGP PUBLIC KEY") > 0);
- Assert.equal((await key.subkeys[0].getExpirationTime()), Infinity);
+ Assert.equal((await (await key.subkeys[0]).getExpirationTime()), Infinity);
let newKey = await pgpjs_keys.changeKeyExpiry(key, [0, 1], 86400);
- let exp = await (newKey.subkeys[0].getExpirationTime());
-
+ let exp = await (await (newKey.subkeys[0]).getExpirationTime());
Assert.ok(exp.getTime() > NOW + 80000 * 1000);
Assert.ok(exp.getTime() <= NOW + 90000 * 1000);
const ek = (await newKey.getEncryptionKey()).getFingerprint();
@@ -38,7 +37,7 @@ test(withTestGpgHome(asyncTest(async function genKey() {
let newPubKey = newKey.toPublic();
let packetList = await pgpjs_keys.getStrippedKey(newPubKey, "[email protected]", true);
let strippedKey = new PgpJS.PublicKey(packetList);
- Assert.ok((await strippedKey.subkeys[0].getExpirationTime()) > NOW + 80000000);
+ Assert.ok((await (await strippedKey.subkeys[0]).getExpirationTime()) > NOW + 80000000);
Assert.equal((await strippedKey.getPrimaryUser()).user.userID.userID, "Someone <[email protected]>");
Assert.equal((await strippedKey.getSigningKey()).getFingerprint(), sk);
Assert.equal((await strippedKey.getEncryptionKey()).getFingerprint(), ek);