aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/videos-overviews.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-06 14:30:20 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commit23a3a8827cb8b862f5cc7ee2819f39918303beca (patch)
tree93a3bdbd02787d32094d6d50aa209f2c079038a5 /server/tests/api/check-params/videos-overviews.ts
parent480d6ea6791fe4100f1905af1e1e3a08173594ea (diff)
downloadPeerTube-23a3a8827cb8b862f5cc7ee2819f39918303beca.tar.gz
PeerTube-23a3a8827cb8b862f5cc7ee2819f39918303beca.tar.zst
PeerTube-23a3a8827cb8b862f5cc7ee2819f39918303beca.zip
Introduce overviews command
Diffstat (limited to 'server/tests/api/check-params/videos-overviews.ts')
-rw-r--r--server/tests/api/check-params/videos-overviews.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/tests/api/check-params/videos-overviews.ts b/server/tests/api/check-params/videos-overviews.ts
index 69d7fc471..44a936c9f 100644
--- a/server/tests/api/check-params/videos-overviews.ts
+++ b/server/tests/api/check-params/videos-overviews.ts
@@ -1,8 +1,7 @@
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 'mocha' 3import 'mocha'
4import { cleanupTests, flushAndRunServer, ServerInfo } from '../../../../shared/extra-utils' 4import { cleanupTests, flushAndRunServer, ServerInfo } from '@shared/extra-utils'
5import { getVideosOverview } from '@shared/extra-utils/overviews/overviews'
6 5
7describe('Test videos overview', function () { 6describe('Test videos overview', function () {
8 let server: ServerInfo 7 let server: ServerInfo
@@ -18,12 +17,12 @@ describe('Test videos overview', function () {
18 describe('When getting videos overview', function () { 17 describe('When getting videos overview', function () {
19 18
20 it('Should fail with a bad pagination', async function () { 19 it('Should fail with a bad pagination', async function () {
21 await getVideosOverview(server.url, 0, 400) 20 await server.overviewsCommand.getVideos({ page: 0, expectedStatus: 400 })
22 await getVideosOverview(server.url, 100, 400) 21 await server.overviewsCommand.getVideos({ page: 100, expectedStatus: 400 })
23 }) 22 })
24 23
25 it('Should succeed with a good pagination', async function () { 24 it('Should succeed with a good pagination', async function () {
26 await getVideosOverview(server.url, 1) 25 await server.overviewsCommand.getVideos({ page: 1 })
27 }) 26 })
28 }) 27 })
29 28