diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-06 15:22:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:17 +0200 |
commit | af971e06c620bd46a5aa64c8833364e7022b5e3d (patch) | |
tree | 4288b66b79fe4dd1ab9496e85a3abf7d747ad03a /server/tests/api/videos/videos-history.ts | |
parent | 23a3a8827cb8b862f5cc7ee2819f39918303beca (diff) | |
download | PeerTube-af971e06c620bd46a5aa64c8833364e7022b5e3d.tar.gz PeerTube-af971e06c620bd46a5aa64c8833364e7022b5e3d.tar.zst PeerTube-af971e06c620bd46a5aa64c8833364e7022b5e3d.zip |
Introduce search command
Diffstat (limited to 'server/tests/api/videos/videos-history.ts')
-rw-r--r-- | server/tests/api/videos/videos-history.ts | 15 |
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 | ||
3 | import * as chai from 'chai' | ||
4 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | ||
5 | import { HttpStatusCode } from '@shared/core-utils' | ||
5 | import { | 6 | import { |
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' |
21 | import { Video, VideoDetails } from '../../../../shared/models/videos' | 21 | import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '@shared/extra-utils/videos/video-history' |
22 | import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/extra-utils/videos/video-history' | 22 | import { Video, VideoDetails } from '@shared/models' |
23 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
24 | 23 | ||
25 | const expect = chai.expect | 24 | const 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) { |