aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/server/follows.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-10 09:43:53 +0200
committerChocobozzz <me@florianbigard.com>2018-10-10 09:43:53 +0200
commitb014b6b9c7cb68d09c52b44046afe486c0736426 (patch)
treedcc10748eac50400d670e9fa0163f73b96f6194a /server/tests/utils/server/follows.ts
parent9ccff23877ec8d740fcd5a9254fcd2424b62d2c8 (diff)
downloadPeerTube-b014b6b9c7cb68d09c52b44046afe486c0736426.tar.gz
PeerTube-b014b6b9c7cb68d09c52b44046afe486c0736426.tar.zst
PeerTube-b014b6b9c7cb68d09c52b44046afe486c0736426.zip
Add ability to search on followers/following
Diffstat (limited to 'server/tests/utils/server/follows.ts')
-rw-r--r--server/tests/utils/server/follows.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/tests/utils/server/follows.ts b/server/tests/utils/server/follows.ts
index 8a65a958b..7741757a6 100644
--- a/server/tests/utils/server/follows.ts
+++ b/server/tests/utils/server/follows.ts
@@ -2,7 +2,7 @@ import * as request from 'supertest'
2import { ServerInfo } from './servers' 2import { ServerInfo } from './servers'
3import { waitJobs } from './jobs' 3import { waitJobs } from './jobs'
4 4
5function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string) { 5function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) {
6 const path = '/api/v1/server/followers' 6 const path = '/api/v1/server/followers'
7 7
8 return request(url) 8 return request(url)
@@ -10,12 +10,13 @@ function getFollowersListPaginationAndSort (url: string, start: number, count: n
10 .query({ start }) 10 .query({ start })
11 .query({ count }) 11 .query({ count })
12 .query({ sort }) 12 .query({ sort })
13 .query({ search })
13 .set('Accept', 'application/json') 14 .set('Accept', 'application/json')
14 .expect(200) 15 .expect(200)
15 .expect('Content-Type', /json/) 16 .expect('Content-Type', /json/)
16} 17}
17 18
18function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string) { 19function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) {
19 const path = '/api/v1/server/following' 20 const path = '/api/v1/server/following'
20 21
21 return request(url) 22 return request(url)
@@ -23,6 +24,7 @@ function getFollowingListPaginationAndSort (url: string, start: number, count: n
23 .query({ start }) 24 .query({ start })
24 .query({ count }) 25 .query({ count })
25 .query({ sort }) 26 .query({ sort })
27 .query({ search })
26 .set('Accept', 'application/json') 28 .set('Accept', 'application/json')
27 .expect(200) 29 .expect(200)
28 .expect('Content-Type', /json/) 30 .expect('Content-Type', /json/)