aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-15 10:02:54 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commitd23dd9fbfc4d26026352c10f81d2795ceaf2908a (patch)
treeda82286d423c5e834a1ee2dcd5970076b8263cf1 /server/tests/api/check-params/users.ts
parent7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (diff)
downloadPeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.gz
PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.zst
PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.zip
Introduce videos command
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r--server/tests/api/check-params/users.ts21
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
3import 'mocha' 3import 'mocha'
4import { omit } from 'lodash' 4import { omit } from 'lodash'
5import { UserRole, VideoCreateResult } from '../../../../shared' 5import { HttpStatusCode } from '@shared/core-utils'
6import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
7import { 6import {
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'
22import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email' 24import { UserAdminFlag, UserRole, VideoCreateResult } from '@shared/models'
23import {
24 checkBadCountPagination,
25 checkBadSortPagination,
26 checkBadStartPagination
27} from '../../../../shared/extra-utils/requests/check-api-params'
28import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
29 25
30describe('Test users API validators', function () { 26describe('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 {