X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-imports.ts;h=5636de45f7144c55be37deeaf6c6fc62c1686344;hb=32fde390f465b9ceef9e49c4037acdacbe176d65;hp=a487062a288d5cca6c1caf06f70a39bbc96e76fb;hpb=2a491182e483b97afb1b65c908b23cb48d591807;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts index a487062a2..5636de45f 100644 --- a/server/tests/api/videos/video-imports.ts +++ b/server/tests/api/videos/video-imports.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' import { pathExists, readdir, remove } from 'fs-extra' import { join } from 'path' @@ -42,7 +41,7 @@ async function checkVideosServer1 (server: PeerTubeServer, idHttp: string, idMag const videoTorrent = await server.videos.get({ id: idTorrent }) for (const video of [ videoMagnet, videoTorrent ]) { - expect(video.category.label).to.equal('Misc') + expect(video.category.label).to.equal('Unknown') expect(video.licence.label).to.equal('Unknown') expect(video.language.label).to.equal('Unknown') expect(video.nsfw).to.be.false @@ -228,6 +227,15 @@ describe('Test video imports', function () { expect(videoImports[0].targetUrl).to.equal(FIXTURE_URLS.youtube) }) + it('Should search in my imports', async function () { + const { total, data: videoImports } = await servers[0].imports.getMyVideoImports({ search: 'peertube2' }) + expect(total).to.equal(1) + expect(videoImports).to.have.lengthOf(1) + + expect(videoImports[0].magnetUri).to.equal(FIXTURE_URLS.magnet) + expect(videoImports[0].video.name).to.equal('super peertube2 video') + }) + it('Should have the video listed on the two instances', async function () { this.timeout(120_000)