]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/tests/api/check-params/videos-overviews.ts
shared/ typescript types dir server-commands
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / videos-overviews.ts
CommitLineData
764a9657
C
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2
3import 'mocha'
bf54587a 4import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands'
764a9657
C
5
6describe('Test videos overview', function () {
254d3579 7 let server: PeerTubeServer
764a9657
C
8
9 // ---------------------------------------------------------------
10
11 before(async function () {
12 this.timeout(30000)
13
254d3579 14 server = await createSingleServer(1)
764a9657
C
15 })
16
17 describe('When getting videos overview', function () {
18
19 it('Should fail with a bad pagination', async function () {
89d241a7
C
20 await server.overviews.getVideos({ page: 0, expectedStatus: 400 })
21 await server.overviews.getVideos({ page: 100, expectedStatus: 400 })
764a9657
C
22 })
23
24 it('Should succeed with a good pagination', async function () {
89d241a7 25 await server.overviews.getVideos({ page: 1 })
764a9657
C
26 })
27 })
28
29 after(async function () {
30 await cleanupTests([ server ])
31 })
32})