diff options
Diffstat (limited to 'server/tests/plugins')
-rw-r--r-- | server/tests/plugins/plugin-helpers.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/server/tests/plugins/plugin-helpers.ts b/server/tests/plugins/plugin-helpers.ts index 26f66b0b1..da84658bb 100644 --- a/server/tests/plugins/plugin-helpers.ts +++ b/server/tests/plugins/plugin-helpers.ts | |||
@@ -224,6 +224,7 @@ describe('Test plugin helpers', function () { | |||
224 | 224 | ||
225 | describe('Videos', function () { | 225 | describe('Videos', function () { |
226 | let videoUUID: string | 226 | let videoUUID: string |
227 | let videoPath: string | ||
227 | 228 | ||
228 | before(async () => { | 229 | before(async () => { |
229 | this.timeout(240000) | 230 | this.timeout(240000) |
@@ -260,6 +261,8 @@ describe('Test plugin helpers', function () { | |||
260 | await makeRawRequest(file.url, HttpStatusCode.OK_200) | 261 | await makeRawRequest(file.url, HttpStatusCode.OK_200) |
261 | } | 262 | } |
262 | } | 263 | } |
264 | |||
265 | videoPath = body.webtorrent.videoFiles[0].path | ||
263 | } | 266 | } |
264 | 267 | ||
265 | // Thumbnails check | 268 | // Thumbnails check |
@@ -278,6 +281,20 @@ describe('Test plugin helpers', function () { | |||
278 | } | 281 | } |
279 | }) | 282 | }) |
280 | 283 | ||
284 | it('Should probe a file', async function () { | ||
285 | const { body } = await makeGetRequest({ | ||
286 | url: servers[0].url, | ||
287 | path: '/plugins/test-four/router/ffprobe', | ||
288 | query: { | ||
289 | path: videoPath | ||
290 | }, | ||
291 | expectedStatus: HttpStatusCode.OK_200 | ||
292 | }) | ||
293 | |||
294 | expect(body.streams).to.be.an('array') | ||
295 | expect(body.streams).to.have.lengthOf(2) | ||
296 | }) | ||
297 | |||
281 | it('Should remove a video after a view', async function () { | 298 | it('Should remove a video after a view', async function () { |
282 | this.timeout(40000) | 299 | this.timeout(40000) |
283 | 300 | ||