diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-30 14:31:39 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-30 14:31:39 +0100 |
commit | cca1e13b96799377f19bcc95110fbf76ff741e20 (patch) | |
tree | 785dfaa81d1eb4e568a038161611126f7704af0b /server/tests/api | |
parent | 1a393a7e23cb20afa951d4ef77084487629df58e (diff) | |
download | PeerTube-cca1e13b96799377f19bcc95110fbf76ff741e20.tar.gz PeerTube-cca1e13b96799377f19bcc95110fbf76ff741e20.tar.zst PeerTube-cca1e13b96799377f19bcc95110fbf76ff741e20.zip |
Add test to search in my videos
Diffstat (limited to 'server/tests/api')
-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 () { |