aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/videos.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/tests/utils/videos.ts b/server/tests/utils/videos.ts
index 08fa48da6..2a5d00255 100644
--- a/server/tests/utils/videos.ts
+++ b/server/tests/utils/videos.ts
@@ -61,6 +61,14 @@ function getVideo (url: string, id: number | string) {
61 .expect('Content-Type', /json/) 61 .expect('Content-Type', /json/)
62} 62}
63 63
64function getVideoDescription (url: string, descriptionPath: string) {
65 return request(url)
66 .get(descriptionPath)
67 .set('Accept', 'application/json')
68 .expect(200)
69 .expect('Content-Type', /json/)
70}
71
64function getVideosList (url: string) { 72function getVideosList (url: string) {
65 const path = '/api/v1/videos' 73 const path = '/api/v1/videos'
66 74
@@ -263,6 +271,7 @@ function parseTorrentVideo (server: ServerInfo, videoUUID: string, resolution: n
263// --------------------------------------------------------------------------- 271// ---------------------------------------------------------------------------
264 272
265export { 273export {
274 getVideoDescription,
266 getVideoCategories, 275 getVideoCategories,
267 getVideoLicences, 276 getVideoLicences,
268 getVideoLanguages, 277 getVideoLanguages,