aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users/user-subscriptions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/users/user-subscriptions.ts')
-rw-r--r--server/tests/api/users/user-subscriptions.ts33
1 files changed, 15 insertions, 18 deletions
diff --git a/server/tests/api/users/user-subscriptions.ts b/server/tests/api/users/user-subscriptions.ts
index 60676a37b..7e365d797 100644
--- a/server/tests/api/users/user-subscriptions.ts
+++ b/server/tests/api/users/user-subscriptions.ts
@@ -1,30 +1,27 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import * as chai from 'chai'
4import 'mocha' 3import 'mocha'
4import * as chai from 'chai'
5import { 5import {
6 addUserSubscription,
7 areSubscriptionsExist,
6 cleanupTests, 8 cleanupTests,
7 createUser, 9 createUser,
8 doubleFollow, 10 doubleFollow,
9 flushAndRunMultipleServers, 11 flushAndRunMultipleServers,
10 follow,
11 getVideosList,
12 unfollow,
13 updateVideo,
14 userLogin
15} from '../../../../shared/extra-utils'
16import { ServerInfo, uploadVideo } from '../../../../shared/extra-utils/index'
17import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
18import { Video, VideoChannel } from '../../../../shared/models/videos'
19import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
20import {
21 addUserSubscription,
22 areSubscriptionsExist,
23 getUserSubscription, 12 getUserSubscription,
13 getVideosList,
24 listUserSubscriptions, 14 listUserSubscriptions,
25 listUserSubscriptionVideos, 15 listUserSubscriptionVideos,
26 removeUserSubscription 16 removeUserSubscription,
27} from '../../../../shared/extra-utils/users/user-subscriptions' 17 ServerInfo,
18 setAccessTokensToServers,
19 updateVideo,
20 uploadVideo,
21 userLogin,
22 waitJobs
23} from '@shared/extra-utils'
24import { Video, VideoChannel } from '@shared/models'
28 25
29const expect = chai.expect 26const expect = chai.expect
30 27
@@ -250,7 +247,7 @@ describe('Test users subscriptions', function () {
250 it('Should have server 1 follow server 3 and display server 3 videos', async function () { 247 it('Should have server 1 follow server 3 and display server 3 videos', async function () {
251 this.timeout(60000) 248 this.timeout(60000)
252 249
253 await follow(servers[0].url, [ servers[2].url ], servers[0].accessToken) 250 await servers[0].followsCommand.follow({ targets: [ servers[2].url ] })
254 251
255 await waitJobs(servers) 252 await waitJobs(servers)
256 253
@@ -268,7 +265,7 @@ describe('Test users subscriptions', function () {
268 it('Should remove follow server 1 -> server 3 and hide server 3 videos', async function () { 265 it('Should remove follow server 1 -> server 3 and hide server 3 videos', async function () {
269 this.timeout(60000) 266 this.timeout(60000)
270 267
271 await unfollow(servers[0].url, servers[0].accessToken, servers[2]) 268 await servers[0].followsCommand.unfollow({ target: servers[2] })
272 269
273 await waitJobs(servers) 270 await waitJobs(servers)
274 271