diff options
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/videos.ts | 9 |
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 | ||
64 | function 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 | |||
64 | function getVideosList (url: string) { | 72 | function 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 | ||
265 | export { | 273 | export { |
274 | getVideoDescription, | ||
266 | getVideoCategories, | 275 | getVideoCategories, |
267 | getVideoLicences, | 276 | getVideoLicences, |
268 | getVideoLanguages, | 277 | getVideoLanguages, |