aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/services.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-08 15:54:39 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commite6346d59e63135cf012ed18c102d3b0179ef565f (patch)
treee65259adb50daa6376c9878abeef051d99191328 /server/tests/api/check-params/services.ts
parent72cbfc5695ec5ebdb9721d3648218f63feeaeac5 (diff)
downloadPeerTube-e6346d59e63135cf012ed18c102d3b0179ef565f.tar.gz
PeerTube-e6346d59e63135cf012ed18c102d3b0179ef565f.tar.zst
PeerTube-e6346d59e63135cf012ed18c102d3b0179ef565f.zip
Introduce playlist command
Diffstat (limited to 'server/tests/api/check-params/services.ts')
-rw-r--r--server/tests/api/check-params/services.ts18
1 files changed, 7 insertions, 11 deletions
diff --git a/server/tests/api/check-params/services.ts b/server/tests/api/check-params/services.ts
index 514e3da70..595fab70d 100644
--- a/server/tests/api/check-params/services.ts
+++ b/server/tests/api/check-params/services.ts
@@ -1,19 +1,17 @@
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 'mocha' 3import 'mocha'
4 4import { VideoPlaylistPrivacy } from '@shared/models'
5import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
5import { 6import {
6 cleanupTests, 7 cleanupTests,
7 flushAndRunServer, 8 flushAndRunServer,
8 makeGetRequest, 9 makeGetRequest,
9 ServerInfo, 10 ServerInfo,
10 setAccessTokensToServers, 11 setAccessTokensToServers,
11 uploadVideo, 12 setDefaultVideoChannel,
12 createVideoPlaylist, 13 uploadVideo
13 setDefaultVideoChannel
14} from '../../../../shared/extra-utils' 14} from '../../../../shared/extra-utils'
15import { VideoPlaylistPrivacy } from '@shared/models'
16import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
17 15
18describe('Test services API validators', function () { 16describe('Test services API validators', function () {
19 let server: ServerInfo 17 let server: ServerInfo
@@ -34,17 +32,15 @@ describe('Test services API validators', function () {
34 } 32 }
35 33
36 { 34 {
37 const res = await createVideoPlaylist({ 35 const created = await server.playlistsCommand.create({
38 url: server.url, 36 attributes: {
39 token: server.accessToken,
40 playlistAttrs: {
41 displayName: 'super playlist', 37 displayName: 'super playlist',
42 privacy: VideoPlaylistPrivacy.PUBLIC, 38 privacy: VideoPlaylistPrivacy.PUBLIC,
43 videoChannelId: server.videoChannel.id 39 videoChannelId: server.videoChannel.id
44 } 40 }
45 }) 41 })
46 42
47 playlistUUID = res.body.videoPlaylist.uuid 43 playlistUUID = created.uuid
48 } 44 }
49 }) 45 })
50 46