aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/moderation
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-07 16:40:49 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commit2c27e70471120c92e0bc8c8114141fbb31ff98ac (patch)
treef52d89adc0351168fd1d89cbc07652e1408caaf2 /server/tests/api/moderation
parent5f8bd4cbb178290da7d8f81e996f19f0eccc8e4c (diff)
downloadPeerTube-2c27e70471120c92e0bc8c8114141fbb31ff98ac.tar.gz
PeerTube-2c27e70471120c92e0bc8c8114141fbb31ff98ac.tar.zst
PeerTube-2c27e70471120c92e0bc8c8114141fbb31ff98ac.zip
Introduce subscriptions command
Diffstat (limited to 'server/tests/api/moderation')
-rw-r--r--server/tests/api/moderation/blocklist-notification.ts10
1 files changed, 4 insertions, 6 deletions
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 @@
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { 5import {
6 addUserSubscription,
7 addVideoCommentThread, 6 addVideoCommentThread,
8 cleanupTests, 7 cleanupTests,
9 createUser, 8 createUser,
@@ -11,7 +10,6 @@ import {
11 flushAndRunMultipleServers, 10 flushAndRunMultipleServers,
12 getUserNotifications, 11 getUserNotifications,
13 markAsReadAllNotifications, 12 markAsReadAllNotifications,
14 removeUserSubscription,
15 ServerInfo, 13 ServerInfo,
16 setAccessTokensToServers, 14 setAccessTokensToServers,
17 uploadVideo, 15 uploadVideo,
@@ -44,8 +42,8 @@ describe('Test blocklist', function () {
44 42
45 async function resetState () { 43 async function resetState () {
46 try { 44 try {
47 await removeUserSubscription(servers[1].url, remoteUserToken, 'user1_channel@' + servers[0].host) 45 await servers[1].subscriptionsCommand.remove({ token: remoteUserToken, uri: 'user1_channel@' + servers[0].host })
48 await removeUserSubscription(servers[1].url, remoteUserToken, 'user2_channel@' + servers[0].host) 46 await servers[1].subscriptionsCommand.remove({ token: remoteUserToken, uri: 'user2_channel@' + servers[0].host })
49 } catch {} 47 } catch {}
50 48
51 await waitJobs(servers) 49 await waitJobs(servers)
@@ -66,8 +64,8 @@ describe('Test blocklist', function () {
66 64
67 { 65 {
68 66
69 await addUserSubscription(servers[1].url, remoteUserToken, 'user1_channel@' + servers[0].host) 67 await servers[1].subscriptionsCommand.add({ token: remoteUserToken, targetUri: 'user1_channel@' + servers[0].host })
70 await addUserSubscription(servers[1].url, remoteUserToken, 'user2_channel@' + servers[0].host) 68 await servers[1].subscriptionsCommand.add({ token: remoteUserToken, targetUri: 'user2_channel@' + servers[0].host })
71 } 69 }
72 70
73 await waitJobs(servers) 71 await waitJobs(servers)