aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/video-constants.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/plugins/video-constants.ts')
-rw-r--r--server/tests/plugins/video-constants.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/tests/plugins/video-constants.ts b/server/tests/plugins/video-constants.ts
index fec9196e2..5ee41fee1 100644
--- a/server/tests/plugins/video-constants.ts
+++ b/server/tests/plugins/video-constants.ts
@@ -16,6 +16,7 @@ import {
16 uploadVideo 16 uploadVideo
17} from '../../../shared/extra-utils' 17} from '../../../shared/extra-utils'
18import { VideoDetails, VideoPlaylistPrivacy } from '../../../shared/models/videos' 18import { VideoDetails, VideoPlaylistPrivacy } from '../../../shared/models/videos'
19import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
19 20
20const expect = chai.expect 21const expect = chai.expect
21 22
@@ -89,12 +90,17 @@ describe('Test plugin altering video constants', function () {
89 90
90 it('Should not be able to create a video with this privacy', async function () { 91 it('Should not be able to create a video with this privacy', async function () {
91 const attrs = { name: 'video', privacy: 2 } 92 const attrs = { name: 'video', privacy: 2 }
92 await uploadVideo(server.url, server.accessToken, attrs, 400) 93 await uploadVideo(server.url, server.accessToken, attrs, HttpStatusCode.BAD_REQUEST_400)
93 }) 94 })
94 95
95 it('Should not be able to create a video with this privacy', async function () { 96 it('Should not be able to create a video with this privacy', async function () {
96 const attrs = { displayName: 'video playlist', privacy: VideoPlaylistPrivacy.PRIVATE } 97 const attrs = { displayName: 'video playlist', privacy: VideoPlaylistPrivacy.PRIVATE }
97 await createVideoPlaylist({ url: server.url, token: server.accessToken, playlistAttrs: attrs, expectedStatus: 400 }) 98 await createVideoPlaylist({
99 url: server.url,
100 token: server.accessToken,
101 playlistAttrs: attrs,
102 expectedStatus: HttpStatusCode.BAD_REQUEST_400
103 })
98 }) 104 })
99 105
100 it('Should be able to upload a video with these values', async function () { 106 it('Should be able to upload a video with these values', async function () {