From d8b34ee55b654912f86bb8b472d391ced8c28f64 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Wed, 13 Jan 2021 09:16:15 +0100 Subject: Allow user to search through their watch history (#3576) * allow user to search through their watch history * add tests for search in watch history * Update client/src/app/shared/shared-main/users/user-history.service.ts --- server/tests/api/videos/videos-history.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'server/tests') diff --git a/server/tests/api/videos/videos-history.ts b/server/tests/api/videos/videos-history.ts index 661d603cb..b25cff879 100644 --- a/server/tests/api/videos/videos-history.ts +++ b/server/tests/api/videos/videos-history.ts @@ -152,6 +152,15 @@ describe('Test videos history', function () { expect(res.body.data).to.have.lengthOf(0) }) + it('Should be able to search through videos in my history', async function () { + const res = await listMyVideosHistory(server.url, server.accessToken, '2') + + expect(res.body.total).to.equal(1) + + const videos: Video[] = res.body.data + expect(videos[0].name).to.equal('video 2') + }) + it('Should clear my history', async function () { await removeMyVideosHistory(server.url, server.accessToken, video3WatchedDate.toISOString()) }) -- cgit v1.2.3