From c56dd2807fe5d129907b9bf8c42656a8314d754b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 26 May 2023 16:00:19 +0200 Subject: Fix peertube subtitles import --- server/tests/api/videos/video-imports.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server/tests/api') diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts index 878452ed2..192b2aeb9 100644 --- a/server/tests/api/videos/video-imports.ts +++ b/server/tests/api/videos/video-imports.ts @@ -449,6 +449,16 @@ describe('Test video imports', function () { const video = await server.videos.get({ id: videoUUID }) expect(video.name).to.equal('E2E tests') + + const { data: captions } = await server.captions.list({ videoId: videoUUID }) + expect(captions).to.have.lengthOf(1) + expect(captions[0].language.id).to.equal('fr') + + const str = `WEBVTT FILE\r?\n\r?\n` + + `1\r?\n` + + `00:00:04.000 --> 00:00:09.000\r?\n` + + `January 1, 1994. The North American` + await testCaptionFile(server.url, captions[0].captionPath, new RegExp(str)) } } }) -- cgit v1.2.3