aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/videos-filter.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 10:42:24 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commitc0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea (patch)
treebaf29753ac5d4598643e3bee719f8df0cc36c59d /server/tests/api/videos/videos-filter.ts
parent08642a765ea514a00f159db898edf14c376fbe6c (diff)
downloadPeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.gz
PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.zst
PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.zip
Refactor requests
Diffstat (limited to 'server/tests/api/videos/videos-filter.ts')
-rw-r--r--server/tests/api/videos/videos-filter.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/tests/api/videos/videos-filter.ts b/server/tests/api/videos/videos-filter.ts
index db9150655..88dff3e7f 100644
--- a/server/tests/api/videos/videos-filter.ts
+++ b/server/tests/api/videos/videos-filter.ts
@@ -2,7 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { HttpStatusCode } from '@shared/core-utils' 5import { HttpStatusCode } from '@shared/models'
6import { 6import {
7 cleanupTests, 7 cleanupTests,
8 doubleFollow, 8 doubleFollow,
@@ -13,7 +13,7 @@ import {
13} from '@shared/extra-utils' 13} from '@shared/extra-utils'
14import { UserRole, Video, VideoPrivacy } from '@shared/models' 14import { UserRole, Video, VideoPrivacy } from '@shared/models'
15 15
16async function getVideosNames (server: PeerTubeServer, token: string, filter: string, statusCodeExpected = HttpStatusCode.OK_200) { 16async function getVideosNames (server: PeerTubeServer, token: string, filter: string, expectedStatus = HttpStatusCode.OK_200) {
17 const paths = [ 17 const paths = [
18 '/api/v1/video-channels/root_channel/videos', 18 '/api/v1/video-channels/root_channel/videos',
19 '/api/v1/accounts/root/videos', 19 '/api/v1/accounts/root/videos',
@@ -32,7 +32,7 @@ async function getVideosNames (server: PeerTubeServer, token: string, filter: st
32 sort: 'createdAt', 32 sort: 'createdAt',
33 filter 33 filter
34 }, 34 },
35 statusCodeExpected 35 expectedStatus
36 }) 36 })
37 37
38 videosResults.push(res.body.data.map(v => v.name)) 38 videosResults.push(res.body.data.map(v => v.name))