X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fmoderation%2Fblocklist-notification.ts;h=5b9699816630610b7ebfb1f62f93bfbb3f727896;hb=6910f20f114b5bd020258a3a9a3f2117819a60c2;hp=99da64a2dd690c25e8affe2574fde8322f2417b0;hpb=5f8bd4cbb178290da7d8f81e996f19f0eccc8e4c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/moderation/blocklist-notification.ts b/server/tests/api/moderation/blocklist-notification.ts index 99da64a2d..5b9699816 100644 --- a/server/tests/api/moderation/blocklist-notification.ts +++ b/server/tests/api/moderation/blocklist-notification.ts @@ -3,7 +3,6 @@ import 'mocha' import * as chai from 'chai' import { - addUserSubscription, addVideoCommentThread, cleanupTests, createUser, @@ -11,7 +10,6 @@ import { flushAndRunMultipleServers, getUserNotifications, markAsReadAllNotifications, - removeUserSubscription, ServerInfo, setAccessTokensToServers, uploadVideo, @@ -44,8 +42,8 @@ describe('Test blocklist', function () { async function resetState () { try { - await removeUserSubscription(servers[1].url, remoteUserToken, 'user1_channel@' + servers[0].host) - await removeUserSubscription(servers[1].url, remoteUserToken, 'user2_channel@' + servers[0].host) + await servers[1].subscriptionsCommand.remove({ token: remoteUserToken, uri: 'user1_channel@' + servers[0].host }) + await servers[1].subscriptionsCommand.remove({ token: remoteUserToken, uri: 'user2_channel@' + servers[0].host }) } catch {} await waitJobs(servers) @@ -66,8 +64,8 @@ describe('Test blocklist', function () { { - await addUserSubscription(servers[1].url, remoteUserToken, 'user1_channel@' + servers[0].host) - await addUserSubscription(servers[1].url, remoteUserToken, 'user2_channel@' + servers[0].host) + await servers[1].subscriptionsCommand.add({ token: remoteUserToken, targetUri: 'user1_channel@' + servers[0].host }) + await servers[1].subscriptionsCommand.add({ token: remoteUserToken, targetUri: 'user2_channel@' + servers[0].host }) } await waitJobs(servers)