diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-07 16:40:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:17 +0200 |
commit | 2c27e70471120c92e0bc8c8114141fbb31ff98ac (patch) | |
tree | f52d89adc0351168fd1d89cbc07652e1408caaf2 /server/tests/api/notifications/moderation-notifications.ts | |
parent | 5f8bd4cbb178290da7d8f81e996f19f0eccc8e4c (diff) | |
download | PeerTube-2c27e70471120c92e0bc8c8114141fbb31ff98ac.tar.gz PeerTube-2c27e70471120c92e0bc8c8114141fbb31ff98ac.tar.zst PeerTube-2c27e70471120c92e0bc8c8114141fbb31ff98ac.zip |
Introduce subscriptions command
Diffstat (limited to 'server/tests/api/notifications/moderation-notifications.ts')
-rw-r--r-- | server/tests/api/notifications/moderation-notifications.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts index e90640ad6..605b41947 100644 --- a/server/tests/api/notifications/moderation-notifications.ts +++ b/server/tests/api/notifications/moderation-notifications.ts | |||
@@ -3,7 +3,6 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { buildUUID } from '@server/helpers/uuid' | 4 | import { buildUUID } from '@server/helpers/uuid' |
5 | import { | 5 | import { |
6 | addUserSubscription, | ||
7 | addVideoCommentThread, | 6 | addVideoCommentThread, |
8 | addVideoToBlacklist, | 7 | addVideoToBlacklist, |
9 | checkAbuseStateChange, | 8 | checkAbuseStateChange, |
@@ -29,7 +28,6 @@ import { | |||
29 | MockSmtpServer, | 28 | MockSmtpServer, |
30 | prepareNotificationsTest, | 29 | prepareNotificationsTest, |
31 | registerUser, | 30 | registerUser, |
32 | removeUserSubscription, | ||
33 | removeVideoFromBlacklist, | 31 | removeVideoFromBlacklist, |
34 | ServerInfo, | 32 | ServerInfo, |
35 | uploadVideo, | 33 | uploadVideo, |
@@ -488,8 +486,8 @@ describe('Test moderation notifications', function () { | |||
488 | autoBlacklistTestsCustomConfig.transcoding.enabled = true | 486 | autoBlacklistTestsCustomConfig.transcoding.enabled = true |
489 | await servers[0].configCommand.updateCustomConfig({ newCustomConfig: autoBlacklistTestsCustomConfig }) | 487 | await servers[0].configCommand.updateCustomConfig({ newCustomConfig: autoBlacklistTestsCustomConfig }) |
490 | 488 | ||
491 | await addUserSubscription(servers[0].url, servers[0].accessToken, 'user_1_channel@localhost:' + servers[0].port) | 489 | await servers[0].subscriptionsCommand.add({ targetUri: 'user_1_channel@localhost:' + servers[0].port }) |
492 | await addUserSubscription(servers[1].url, servers[1].accessToken, 'user_1_channel@localhost:' + servers[0].port) | 490 | await servers[1].subscriptionsCommand.add({ targetUri: 'user_1_channel@localhost:' + servers[0].port }) |
493 | 491 | ||
494 | }) | 492 | }) |
495 | 493 | ||
@@ -611,8 +609,8 @@ describe('Test moderation notifications', function () { | |||
611 | after(async () => { | 609 | after(async () => { |
612 | await servers[0].configCommand.updateCustomConfig({ newCustomConfig: currentCustomConfig }) | 610 | await servers[0].configCommand.updateCustomConfig({ newCustomConfig: currentCustomConfig }) |
613 | 611 | ||
614 | await removeUserSubscription(servers[0].url, servers[0].accessToken, 'user_1_channel@localhost:' + servers[0].port) | 612 | await servers[0].subscriptionsCommand.remove({ uri: 'user_1_channel@localhost:' + servers[0].port }) |
615 | await removeUserSubscription(servers[1].url, servers[1].accessToken, 'user_1_channel@localhost:' + servers[0].port) | 613 | await servers[1].subscriptionsCommand.remove({ uri: 'user_1_channel@localhost:' + servers[0].port }) |
616 | }) | 614 | }) |
617 | }) | 615 | }) |
618 | 616 | ||