From 1e674f2c36e92310c1e4189c0dd3ddf17ab4e300 Mon Sep 17 00:00:00 2001 From: Rinse Date: Sun, 3 Sep 2023 17:00:13 +0000 Subject: [PATCH] fix bug in test --- test/node-and-browser/signatures/pubsub.messages.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/node-and-browser/signatures/pubsub.messages.test.js b/test/node-and-browser/signatures/pubsub.messages.test.js index c7df5cc1..7049b68a 100644 --- a/test/node-and-browser/signatures/pubsub.messages.test.js +++ b/test/node-and-browser/signatures/pubsub.messages.test.js @@ -307,10 +307,10 @@ describe("challengeanswer", async () => { const comment = await generateMockPost(imageCaptchaSubplebbitAddress, tempPlebbit); comment.removeAllListeners("challenge"); - const originalPublish = comment._clientsManager.pubsubPublish.bind(comment._clientsManager); + const originalPublish = comment._clientsManager.pubsubPublishOnProvider.bind(comment._clientsManager); comment.once("challenge", async (challengeMsg) => { - comment._clientsManager.pubsubPublish = () => undefined; + comment._clientsManager.pubsubPublishOnProvider = () => undefined; // Disable publishing await comment.publishChallengeAnswers([]); // comment._challengeAnswer should be defined now @@ -320,7 +320,7 @@ describe("challengeanswer", async () => { signers[5].publicKey // Use a public key that cannot be decrypted for the sub ); comment._challengeAnswer.signature = await signChallengeAnswer(comment._challengeAnswer, comment.pubsubMessageSigner); - await originalPublish(comment.subplebbit.pubsubTopic, comment._challengeAnswer); + await originalPublish(comment.subplebbit.pubsubTopic, comment._challengeAnswer, comment._pubsubProviders[0]); }); await publishWithExpectedResult(comment, false, messages.ERR_SUB_FAILED_TO_DECRYPT_PUBSUB_MSG);