aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-01-13 09:16:15 +0100
committerGitHub <noreply@github.com>2021-01-13 09:16:15 +0100
commitd8b34ee55b654912f86bb8b472d391ced8c28f64 (patch)
treeefa2b8ac36c00fa6e9b5af3f13e54a47bc7a7701 /server/tests
parent22078471fbe5a4dea6177bd1fa19da1cf887679e (diff)
downloadPeerTube-d8b34ee55b654912f86bb8b472d391ced8c28f64.tar.gz
PeerTube-d8b34ee55b654912f86bb8b472d391ced8c28f64.tar.zst
PeerTube-d8b34ee55b654912f86bb8b472d391ced8c28f64.zip
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
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/videos/videos-history.ts9
1 files changed, 9 insertions, 0 deletions
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 () {
152 expect(res.body.data).to.have.lengthOf(0) 152 expect(res.body.data).to.have.lengthOf(0)
153 }) 153 })
154 154
155 it('Should be able to search through videos in my history', async function () {
156 const res = await listMyVideosHistory(server.url, server.accessToken, '2')
157
158 expect(res.body.total).to.equal(1)
159
160 const videos: Video[] = res.body.data
161 expect(videos[0].name).to.equal('video 2')
162 })
163
155 it('Should clear my history', async function () { 164 it('Should clear my history', async function () {
156 await removeMyVideosHistory(server.url, server.accessToken, video3WatchedDate.toISOString()) 165 await removeMyVideosHistory(server.url, server.accessToken, video3WatchedDate.toISOString())
157 }) 166 })