aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/videos-history.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/videos-history.ts')
-rw-r--r--server/tests/api/videos/videos-history.ts15
1 files changed, 7 insertions, 8 deletions
diff --git a/server/tests/api/videos/videos-history.ts b/server/tests/api/videos/videos-history.ts
index b25cff879..209b93014 100644
--- a/server/tests/api/videos/videos-history.ts
+++ b/server/tests/api/videos/videos-history.ts
@@ -1,7 +1,8 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import * as chai from 'chai'
4import 'mocha' 3import 'mocha'
4import * as chai from 'chai'
5import { HttpStatusCode } from '@shared/core-utils'
5import { 6import {
6 cleanupTests, 7 cleanupTests,
7 createUser, 8 createUser,
@@ -10,17 +11,15 @@ import {
10 getVideoWithToken, 11 getVideoWithToken,
11 killallServers, 12 killallServers,
12 reRunServer, 13 reRunServer,
13 searchVideoWithToken,
14 ServerInfo, 14 ServerInfo,
15 setAccessTokensToServers, 15 setAccessTokensToServers,
16 updateMyUser, 16 updateMyUser,
17 uploadVideo, 17 uploadVideo,
18 userLogin, 18 userLogin,
19 wait 19 wait
20} from '../../../../shared/extra-utils' 20} from '@shared/extra-utils'
21import { Video, VideoDetails } from '../../../../shared/models/videos' 21import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '@shared/extra-utils/videos/video-history'
22import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/extra-utils/videos/video-history' 22import { Video, VideoDetails } from '@shared/models'
23import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
24 23
25const expect = chai.expect 24const expect = chai.expect
26 25
@@ -89,8 +88,8 @@ describe('Test videos history', function () {
89 } 88 }
90 89
91 { 90 {
92 const res = await searchVideoWithToken(server.url, 'video', server.accessToken) 91 const body = await server.searchCommand.searchVideos({ token: server.accessToken, search: 'video' })
93 videosOfVideos.push(res.body.data) 92 videosOfVideos.push(body.data)
94 } 93 }
95 94
96 for (const videos of videosOfVideos) { 95 for (const videos of videosOfVideos) {