From 9567011bf01f36c7f796ac1e0f1fb12c71635e53 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 30 Oct 2017 10:16:27 +0100 Subject: Add lazy description on server --- server/tests/utils/videos.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'server/tests/utils') 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) { .expect('Content-Type', /json/) } +function getVideoDescription (url: string, descriptionPath: string) { + return request(url) + .get(descriptionPath) + .set('Accept', 'application/json') + .expect(200) + .expect('Content-Type', /json/) +} + function getVideosList (url: string) { const path = '/api/v1/videos' @@ -263,6 +271,7 @@ function parseTorrentVideo (server: ServerInfo, videoUUID: string, resolution: n // --------------------------------------------------------------------------- export { + getVideoDescription, getVideoCategories, getVideoLicences, getVideoLanguages, -- cgit v1.2.3