aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/video-imports.ts28
1 files changed, 16 insertions, 12 deletions
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts
index 5636de45f..80215f038 100644
--- a/server/tests/api/videos/video-imports.ts
+++ b/server/tests/api/videos/video-imports.ts
@@ -68,6 +68,8 @@ async function checkVideoServer2 (server: PeerTubeServer, id: number | string) {
68 expect(video.description).to.equal('my super description') 68 expect(video.description).to.equal('my super description')
69 expect(video.tags).to.deep.equal([ 'supertag1', 'supertag2' ]) 69 expect(video.tags).to.deep.equal([ 'supertag1', 'supertag2' ])
70 70
71 await testImage(server.url, 'thumbnail', video.thumbnailPath)
72
71 expect(video.files).to.have.lengthOf(1) 73 expect(video.files).to.have.lengthOf(1)
72 74
73 const bodyCaptions = await server.captions.list({ videoId: id }) 75 const bodyCaptions = await server.captions.list({ videoId: id })
@@ -254,18 +256,20 @@ describe('Test video imports', function () {
254 it('Should import a video on server 2 with some fields', async function () { 256 it('Should import a video on server 2 with some fields', async function () {
255 this.timeout(60_000) 257 this.timeout(60_000)
256 258
257 const attributes = { 259 const { video } = await servers[1].imports.importVideo({
258 targetUrl: FIXTURE_URLS.youtube, 260 attributes: {
259 channelId: servers[1].store.channel.id, 261 targetUrl: FIXTURE_URLS.youtube,
260 privacy: VideoPrivacy.PUBLIC, 262 channelId: servers[1].store.channel.id,
261 category: 10, 263 privacy: VideoPrivacy.PUBLIC,
262 licence: 7, 264 category: 10,
263 language: 'en', 265 licence: 7,
264 name: 'my super name', 266 language: 'en',
265 description: 'my super description', 267 name: 'my super name',
266 tags: [ 'supertag1', 'supertag2' ] 268 description: 'my super description',
267 } 269 tags: [ 'supertag1', 'supertag2' ],
268 const { video } = await servers[1].imports.importVideo({ attributes }) 270 thumbnailfile: 'thumbnail.jpg'
271 }
272 })
269 expect(video.name).to.equal('my super name') 273 expect(video.name).to.equal('my super name')
270 }) 274 })
271 275