X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-imports.ts;fp=server%2Ftests%2Fapi%2Fvideos%2Fvideo-imports.ts;h=192b2aeb9ae7c705090ee2ecf90d1eaeb23e8ef0;hb=c56dd2807fe5d129907b9bf8c42656a8314d754b;hp=878452ed2c988315d66bf842ad6e0936cba81ef1;hpb=c2eb81227b31d15c894b110d090308a9e3ac0606;p=github%2FChocobozzz%2FPeerTube.git 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)) } } })