diff options
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/pods.ts | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/server/tests/utils/pods.ts b/server/tests/utils/pods.ts index a86dd20d9..52e807e70 100644 --- a/server/tests/utils/pods.ts +++ b/server/tests/utils/pods.ts | |||
@@ -12,6 +12,19 @@ function getFriendsList (url: string) { | |||
12 | .expect('Content-Type', /json/) | 12 | .expect('Content-Type', /json/) |
13 | } | 13 | } |
14 | 14 | ||
15 | function getPodsListPaginationAndSort (url: string, start: number, count: number, sort: string) { | ||
16 | const path = '/api/v1/pods/' | ||
17 | |||
18 | return request(url) | ||
19 | .get(path) | ||
20 | .query({ start }) | ||
21 | .query({ count }) | ||
22 | .query({ sort }) | ||
23 | .set('Accept', 'application/json') | ||
24 | .expect(200) | ||
25 | .expect('Content-Type', /json/) | ||
26 | } | ||
27 | |||
15 | async function makeFriends (url: string, accessToken: string, expectedStatus = 204) { | 28 | async function makeFriends (url: string, accessToken: string, expectedStatus = 204) { |
16 | // Which pod makes friends with which pod | 29 | // Which pod makes friends with which pod |
17 | const friendsMatrix = { | 30 | const friendsMatrix = { |
@@ -85,5 +98,6 @@ export { | |||
85 | getFriendsList, | 98 | getFriendsList, |
86 | makeFriends, | 99 | makeFriends, |
87 | quitFriends, | 100 | quitFriends, |
88 | quitOneFriend | 101 | quitOneFriend, |
102 | getPodsListPaginationAndSort | ||
89 | } | 103 | } |