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