aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/videos/video-imports.ts5
-rw-r--r--server/tests/fixtures/video_import_preview.jpgbin0 -> 37360 bytes
-rw-r--r--server/tests/fixtures/video_import_thumbnail.jpgbin0 -> 5885 bytes
3 files changed, 5 insertions, 0 deletions
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts
index 8e179b825..4d5989f43 100644
--- a/server/tests/api/videos/video-imports.ts
+++ b/server/tests/api/videos/video-imports.ts
@@ -19,6 +19,7 @@ import {
19} from '../../../../shared/extra-utils' 19} from '../../../../shared/extra-utils'
20import { waitJobs } from '../../../../shared/extra-utils/server/jobs' 20import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
21import { getMagnetURI, getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' 21import { getMagnetURI, getMyVideoImports, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports'
22import { testImage } from '../../../../shared/extra-utils/miscs/miscs'
22 23
23const expect = chai.expect 24const expect = chai.expect
24 25
@@ -118,6 +119,10 @@ describe('Test video imports', function () {
118 const attributes = immutableAssign(baseAttributes, { targetUrl: getYoutubeVideoUrl() }) 119 const attributes = immutableAssign(baseAttributes, { targetUrl: getYoutubeVideoUrl() })
119 const res = await importVideo(servers[0].url, servers[0].accessToken, attributes) 120 const res = await importVideo(servers[0].url, servers[0].accessToken, attributes)
120 expect(res.body.video.name).to.equal('small video - youtube') 121 expect(res.body.video.name).to.equal('small video - youtube')
122 expect(res.body.video.thumbnailPath).to.equal(`/static/thumbnails/${res.body.video.uuid}.jpg`)
123 expect(res.body.video.previewPath).to.equal(`/static/previews/${res.body.video.uuid}.jpg`)
124 await testImage(servers[0].url, 'video_import_thumbnail', res.body.video.thumbnailPath)
125 await testImage(servers[0].url, 'video_import_preview', res.body.video.previewPath)
121 126
122 const resCaptions = await listVideoCaptions(servers[0].url, res.body.video.id) 127 const resCaptions = await listVideoCaptions(servers[0].url, res.body.video.id)
123 const videoCaptions: VideoCaption[] = resCaptions.body.data 128 const videoCaptions: VideoCaption[] = resCaptions.body.data
diff --git a/server/tests/fixtures/video_import_preview.jpg b/server/tests/fixtures/video_import_preview.jpg
new file mode 100644
index 000000000..1f8d1d91d
--- /dev/null
+++ b/server/tests/fixtures/video_import_preview.jpg
Binary files differ
diff --git a/server/tests/fixtures/video_import_thumbnail.jpg b/server/tests/fixtures/video_import_thumbnail.jpg
new file mode 100644
index 000000000..fcc50b75f
--- /dev/null
+++ b/server/tests/fixtures/video_import_thumbnail.jpg
Binary files differ