]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/plugins/video-constants.ts
Merge branch 'release/3.1.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / plugins / video-constants.ts
index fec9196e25704caa8c2cfeaf07ce580c50a62bf8..5ee41fee14d8c4164478e3711cb619cc54fbaab5 100644 (file)
@@ -16,6 +16,7 @@ import {
   uploadVideo
 } from '../../../shared/extra-utils'
 import { VideoDetails, VideoPlaylistPrivacy } from '../../../shared/models/videos'
+import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
 
 const expect = chai.expect
 
@@ -89,12 +90,17 @@ describe('Test plugin altering video constants', function () {
 
   it('Should not be able to create a video with this privacy', async function () {
     const attrs = { name: 'video', privacy: 2 }
-    await uploadVideo(server.url, server.accessToken, attrs, 400)
+    await uploadVideo(server.url, server.accessToken, attrs, HttpStatusCode.BAD_REQUEST_400)
   })
 
   it('Should not be able to create a video with this privacy', async function () {
     const attrs = { displayName: 'video playlist', privacy: VideoPlaylistPrivacy.PRIVATE }
-    await createVideoPlaylist({ url: server.url, token: server.accessToken, playlistAttrs: attrs, expectedStatus: 400 })
+    await createVideoPlaylist({
+      url: server.url,
+      token: server.accessToken,
+      playlistAttrs: attrs,
+      expectedStatus: HttpStatusCode.BAD_REQUEST_400
+    })
   })
 
   it('Should be able to upload a video with these values', async function () {