From 07bfa5532e11ca94fb05fd70d60683ec5c7e0e9b Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Wed, 26 May 2021 18:18:30 -0400 Subject: [PATCH] fix more unit tests --- spec/unit/crypto/algorithms/megolm.spec.js | 3 +++ spec/unit/crypto/secrets.spec.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/unit/crypto/algorithms/megolm.spec.js b/spec/unit/crypto/algorithms/megolm.spec.js index 22c668fcf..c8e8158bb 100644 --- a/spec/unit/crypto/algorithms/megolm.spec.js +++ b/spec/unit/crypto/algorithms/megolm.spec.js @@ -258,6 +258,9 @@ describe("MegolmDecryption", function() { }); it("re-uses sessions for sequential messages", async function() { + mockCrypto._backupManager = { + backupGroupSession: () => {}, + }; const mockStorage = new MockStorageApi(); const cryptoStore = new MemoryCryptoStore(mockStorage); diff --git a/spec/unit/crypto/secrets.spec.js b/spec/unit/crypto/secrets.spec.js index bcf1871da..297caf064 100644 --- a/spec/unit/crypto/secrets.spec.js +++ b/spec/unit/crypto/secrets.spec.js @@ -376,7 +376,7 @@ describe("Secrets", function() { ]); this.emit("accountData", event); }; - bob._crypto.checkKeyBackup = async () => {}; + bob._crypto._backupManager.checkKeyBackup = async () => {}; const crossSigning = bob._crypto._crossSigningInfo; const secretStorage = bob._crypto._secretStorage;