aboutsummaryrefslogtreecommitdiffhomepage
path: root/packages/tests/src/api/check-params/videos-overviews.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tests/src/api/check-params/videos-overviews.ts')
-rw-r--r--packages/tests/src/api/check-params/videos-overviews.ts31
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/tests/src/api/check-params/videos-overviews.ts b/packages/tests/src/api/check-params/videos-overviews.ts
new file mode 100644
index 000000000..ba6f6ac69
--- /dev/null
+++ b/packages/tests/src/api/check-params/videos-overviews.ts
@@ -0,0 +1,31 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2
3import { cleanupTests, createSingleServer, PeerTubeServer } from '@peertube/peertube-server-commands'
4
5describe('Test videos overview API validator', 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})