aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-30 10:16:27 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-10-30 10:16:27 +0100
commit9567011bf01f36c7f796ac1e0f1fb12c71635e53 (patch)
treebec3ed173767cff031ed0a84231d6dd50e792569 /server/tests/utils/videos.ts
parent757f0da370a992cf07afd20d3829b2748c76cc15 (diff)
downloadPeerTube-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.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,