|
|
@ -52,11 +52,10 @@ describe('MessageEncrypter', () => {
|
|
|
|
it('should return a MEDIUM_GROUP_CIPHERTEXT envelope type', async () => {
|
|
|
|
it('should return a MEDIUM_GROUP_CIPHERTEXT envelope type', async () => {
|
|
|
|
const data = crypto.randomBytes(10);
|
|
|
|
const data = crypto.randomBytes(10);
|
|
|
|
|
|
|
|
|
|
|
|
sandbox.replace(
|
|
|
|
sandbox.stub(
|
|
|
|
Ratchet,
|
|
|
|
Ratchet,
|
|
|
|
'encryptWithSenderKey',
|
|
|
|
'encryptWithSenderKey'
|
|
|
|
sinon.fake.returns({ ciphertext: '' })
|
|
|
|
).resolves({ ciphertext: '' });
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const result = await MessageEncrypter.encrypt(
|
|
|
|
const result = await MessageEncrypter.encrypt(
|
|
|
|
TestUtils.generateFakePubKey(),
|
|
|
|
TestUtils.generateFakePubKey(),
|
|
|
|