+
+ it('Should filter already watched videos by the user', async function () {
+ const { id } = await servers[0].videos.upload({ attributes: { name: 'video for history' } })
+
+ for (const path of paths) {
+ const videos = await listVideos({ server: servers[0], path, isLocal: true, excludeAlreadyWatched: true })
+ const foundVideo = videos.find(video => video.id === id)
+
+ expect(foundVideo).to.not.be.undefined
+ }
+ await servers[0].views.view({ id, token: servers[0].accessToken })
+
+ for (const path of paths) {
+ const videos = await listVideos({ server: servers[0], path, excludeAlreadyWatched: true })
+ const foundVideo = videos.find(video => video.id === id)
+
+ expect(foundVideo).to.be.undefined
+ }
+ })