aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/video-constants.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/plugins/video-constants.ts
parent72cbfc5695ec5ebdb9721d3648218f63feeaeac5 (diff)
downloadPeerTube-e6346d59e63135cf012ed18c102d3b0179ef565f.tar.gz
PeerTube-e6346d59e63135cf012ed18c102d3b0179ef565f.tar.zst
PeerTube-e6346d59e63135cf012ed18c102d3b0179ef565f.zip
Introduce playlist command
Diffstat (limited to 'server/tests/plugins/video-constants.ts')
-rw-r--r--server/tests/plugins/video-constants.ts17
1 files changed, 4 insertions, 13 deletions
diff --git a/server/tests/plugins/video-constants.ts b/server/tests/plugins/video-constants.ts
index 4124e8a52..4a05af042 100644
--- a/server/tests/plugins/video-constants.ts
+++ b/server/tests/plugins/video-constants.ts
@@ -5,13 +5,11 @@ import * as chai from 'chai'
5import { HttpStatusCode } from '@shared/core-utils' 5import { HttpStatusCode } from '@shared/core-utils'
6import { 6import {
7 cleanupTests, 7 cleanupTests,
8 createVideoPlaylist,
9 flushAndRunServer, 8 flushAndRunServer,
10 getVideo, 9 getVideo,
11 getVideoCategories, 10 getVideoCategories,
12 getVideoLanguages, 11 getVideoLanguages,
13 getVideoLicences, 12 getVideoLicences,
14 getVideoPlaylistPrivacies,
15 getVideoPrivacies, 13 getVideoPrivacies,
16 PluginsCommand, 14 PluginsCommand,
17 ServerInfo, 15 ServerInfo,
@@ -79,8 +77,7 @@ describe('Test plugin altering video constants', function () {
79 }) 77 })
80 78
81 it('Should have updated playlist privacies', async function () { 79 it('Should have updated playlist privacies', async function () {
82 const res = await getVideoPlaylistPrivacies(server.url) 80 const playlistPrivacies = await server.playlistsCommand.getPrivacies()
83 const playlistPrivacies = res.body
84 81
85 expect(playlistPrivacies[1]).to.exist 82 expect(playlistPrivacies[1]).to.exist
86 expect(playlistPrivacies[2]).to.exist 83 expect(playlistPrivacies[2]).to.exist
@@ -93,13 +90,8 @@ describe('Test plugin altering video constants', function () {
93 }) 90 })
94 91
95 it('Should not be able to create a video with this privacy', async function () { 92 it('Should not be able to create a video with this privacy', async function () {
96 const attrs = { displayName: 'video playlist', privacy: VideoPlaylistPrivacy.PRIVATE } 93 const attributes = { displayName: 'video playlist', privacy: VideoPlaylistPrivacy.PRIVATE }
97 await createVideoPlaylist({ 94 await server.playlistsCommand.create({ attributes, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
98 url: server.url,
99 token: server.accessToken,
100 playlistAttrs: attrs,
101 expectedStatus: HttpStatusCode.BAD_REQUEST_400
102 })
103 }) 95 })
104 96
105 it('Should be able to upload a video with these values', async function () { 97 it('Should be able to upload a video with these values', async function () {
@@ -162,8 +154,7 @@ describe('Test plugin altering video constants', function () {
162 } 154 }
163 155
164 { 156 {
165 const res = await getVideoPlaylistPrivacies(server.url) 157 const playlistPrivacies = await server.playlistsCommand.getPrivacies()
166 const playlistPrivacies = res.body
167 158
168 expect(playlistPrivacies[1]).to.exist 159 expect(playlistPrivacies[1]).to.exist
169 expect(playlistPrivacies[2]).to.exist 160 expect(playlistPrivacies[2]).to.exist