diff options
Diffstat (limited to 'server/tests/api/users')
-rw-r--r-- | server/tests/api/users/users.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index ca06942e7..07b7fc747 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -309,6 +309,24 @@ describe('Test users', function () { | |||
309 | expect(video.thumbnailPath).to.not.be.null | 309 | expect(video.thumbnailPath).to.not.be.null |
310 | expect(video.previewPath).to.not.be.null | 310 | expect(video.previewPath).to.not.be.null |
311 | }) | 311 | }) |
312 | |||
313 | it('Should be able to search in my videos', async function () { | ||
314 | { | ||
315 | const res = await getMyVideos(server.url, accessTokenUser, 0, 5, '-createdAt', 'user video') | ||
316 | expect(res.body.total).to.equal(1) | ||
317 | |||
318 | const videos = res.body.data | ||
319 | expect(videos).to.have.lengthOf(1) | ||
320 | } | ||
321 | |||
322 | { | ||
323 | const res = await getMyVideos(server.url, accessTokenUser, 0, 5, '-createdAt', 'toto') | ||
324 | expect(res.body.total).to.equal(0) | ||
325 | |||
326 | const videos = res.body.data | ||
327 | expect(videos).to.have.lengthOf(0) | ||
328 | } | ||
329 | }) | ||
312 | }) | 330 | }) |
313 | 331 | ||
314 | describe('Users listing', function () { | 332 | describe('Users listing', function () { |