diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-30 10:16:27 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-30 10:16:27 +0100 |
commit | 9567011bf01f36c7f796ac1e0f1fb12c71635e53 (patch) | |
tree | bec3ed173767cff031ed0a84231d6dd50e792569 /server/tests/utils/videos.ts | |
parent | 757f0da370a992cf07afd20d3829b2748c76cc15 (diff) | |
download | PeerTube-9567011bf01f36c7f796ac1e0f1fb12c71635e53.tar.gz PeerTube-9567011bf01f36c7f796ac1e0f1fb12c71635e53.tar.zst PeerTube-9567011bf01f36c7f796ac1e0f1fb12c71635e53.zip |
Add lazy description on server
Diffstat (limited to 'server/tests/utils/videos.ts')
-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, |