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