diff options
Diffstat (limited to 'server/tests/api/videos/video-privacy.ts')
-rw-r--r-- | server/tests/api/videos/video-privacy.ts | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts index 950aeb7cf..f831dd8a9 100644 --- a/server/tests/api/videos/video-privacy.ts +++ b/server/tests/api/videos/video-privacy.ts | |||
@@ -2,23 +2,24 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' | 5 | import { HttpStatusCode } from '@shared/core-utils' |
6 | import { Video, VideoCreateResult } from '@shared/models' | ||
7 | import { | 6 | import { |
8 | cleanupTests, | 7 | cleanupTests, |
8 | createUser, | ||
9 | doubleFollow, | ||
9 | flushAndRunServer, | 10 | flushAndRunServer, |
11 | getMyVideos, | ||
12 | getVideo, | ||
10 | getVideosList, | 13 | getVideosList, |
11 | getVideosListWithToken, | 14 | getVideosListWithToken, |
15 | getVideoWithToken, | ||
12 | ServerInfo, | 16 | ServerInfo, |
13 | setAccessTokensToServers, | 17 | setAccessTokensToServers, |
14 | uploadVideo | 18 | updateVideo, |
15 | } from '../../../../shared/extra-utils/index' | 19 | uploadVideo, |
16 | import { doubleFollow } from '../../../../shared/extra-utils/server/follows' | 20 | waitJobs |
17 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' | 21 | } from '@shared/extra-utils' |
18 | import { userLogin } from '../../../../shared/extra-utils/users/login' | 22 | import { Video, VideoCreateResult, VideoPrivacy } from '@shared/models' |
19 | import { createUser } from '../../../../shared/extra-utils/users/users' | ||
20 | import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../../../shared/extra-utils/videos/videos' | ||
21 | import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum' | ||
22 | 23 | ||
23 | const expect = chai.expect | 24 | const expect = chai.expect |
24 | 25 | ||
@@ -126,7 +127,7 @@ describe('Test video privacy', function () { | |||
126 | } | 127 | } |
127 | await createUser({ url: servers[0].url, accessToken: servers[0].accessToken, username: user.username, password: user.password }) | 128 | await createUser({ url: servers[0].url, accessToken: servers[0].accessToken, username: user.username, password: user.password }) |
128 | 129 | ||
129 | anotherUserToken = await userLogin(servers[0], user) | 130 | anotherUserToken = await servers[0].loginCommand.getAccessToken(user) |
130 | await getVideoWithToken(servers[0].url, anotherUserToken, privateVideoUUID, HttpStatusCode.FORBIDDEN_403) | 131 | await getVideoWithToken(servers[0].url, anotherUserToken, privateVideoUUID, HttpStatusCode.FORBIDDEN_403) |
131 | }) | 132 | }) |
132 | 133 | ||