diff options
Diffstat (limited to 'server/tests/utils')
-rw-r--r-- | server/tests/utils/requests/check-api-params.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/tests/utils/requests/check-api-params.ts b/server/tests/utils/requests/check-api-params.ts index fbd660629..7550eb3d8 100644 --- a/server/tests/utils/requests/check-api-params.ts +++ b/server/tests/utils/requests/check-api-params.ts | |||
@@ -1,27 +1,30 @@ | |||
1 | import { makeGetRequest } from './requests' | 1 | import { makeGetRequest } from './requests' |
2 | 2 | ||
3 | function checkBadStartPagination (url: string, path: string) { | 3 | function checkBadStartPagination (url: string, path: string, token?: string) { |
4 | return makeGetRequest({ | 4 | return makeGetRequest({ |
5 | url, | 5 | url, |
6 | path, | 6 | path, |
7 | token, | ||
7 | query: { start: 'hello' }, | 8 | query: { start: 'hello' }, |
8 | statusCodeExpected: 400 | 9 | statusCodeExpected: 400 |
9 | }) | 10 | }) |
10 | } | 11 | } |
11 | 12 | ||
12 | function checkBadCountPagination (url: string, path: string) { | 13 | function checkBadCountPagination (url: string, path: string, token?: string) { |
13 | return makeGetRequest({ | 14 | return makeGetRequest({ |
14 | url, | 15 | url, |
15 | path, | 16 | path, |
17 | token, | ||
16 | query: { count: 'hello' }, | 18 | query: { count: 'hello' }, |
17 | statusCodeExpected: 400 | 19 | statusCodeExpected: 400 |
18 | }) | 20 | }) |
19 | } | 21 | } |
20 | 22 | ||
21 | function checkBadSortPagination (url: string, path: string) { | 23 | function checkBadSortPagination (url: string, path: string, token?: string) { |
22 | return makeGetRequest({ | 24 | return makeGetRequest({ |
23 | url, | 25 | url, |
24 | path, | 26 | path, |
27 | token, | ||
25 | query: { sort: 'hello' }, | 28 | query: { sort: 'hello' }, |
26 | statusCodeExpected: 400 | 29 | statusCodeExpected: 400 |
27 | }) | 30 | }) |