diff options
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r-- | server/tests/api/check-params/users.ts | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index 801131918..33c48a009 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts | |||
@@ -2,10 +2,12 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { omit } from 'lodash' | 4 | import { omit } from 'lodash' |
5 | import { UserRole, VideoCreateResult } from '../../../../shared' | 5 | import { HttpStatusCode } from '@shared/core-utils' |
6 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
7 | import { | 6 | import { |
8 | buildAbsoluteFixturePath, | 7 | buildAbsoluteFixturePath, |
8 | checkBadCountPagination, | ||
9 | checkBadSortPagination, | ||
10 | checkBadStartPagination, | ||
9 | cleanupTests, | 11 | cleanupTests, |
10 | flushAndRunServer, | 12 | flushAndRunServer, |
11 | killallServers, | 13 | killallServers, |
@@ -13,19 +15,13 @@ import { | |||
13 | makePostBodyRequest, | 15 | makePostBodyRequest, |
14 | makePutBodyRequest, | 16 | makePutBodyRequest, |
15 | makeUploadRequest, | 17 | makeUploadRequest, |
18 | MockSmtpServer, | ||
16 | reRunServer, | 19 | reRunServer, |
17 | ServerInfo, | 20 | ServerInfo, |
18 | setAccessTokensToServers, | 21 | setAccessTokensToServers, |
19 | uploadVideo, | ||
20 | UsersCommand | 22 | UsersCommand |
21 | } from '../../../../shared/extra-utils' | 23 | } from '@shared/extra-utils' |
22 | import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email' | 24 | import { UserAdminFlag, UserRole, VideoCreateResult } from '@shared/models' |
23 | import { | ||
24 | checkBadCountPagination, | ||
25 | checkBadSortPagination, | ||
26 | checkBadStartPagination | ||
27 | } from '../../../../shared/extra-utils/requests/check-api-params' | ||
28 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' | ||
29 | 25 | ||
30 | describe('Test users API validators', function () { | 26 | describe('Test users API validators', function () { |
31 | const path = '/api/v1/users/' | 27 | const path = '/api/v1/users/' |
@@ -80,8 +76,7 @@ describe('Test users API validators', function () { | |||
80 | } | 76 | } |
81 | 77 | ||
82 | { | 78 | { |
83 | const res = await uploadVideo(server.url, server.accessToken, {}) | 79 | video = await server.videosCommand.upload() |
84 | video = res.body.video | ||
85 | } | 80 | } |
86 | 81 | ||
87 | { | 82 | { |