diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-28 14:40:11 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-28 14:40:11 +0100 |
commit | 93e4a311f37d7fc82ec81190553f8beae28fdef5 (patch) | |
tree | bced0a69b51d0bab35b01bfede629eef60ce3675 /server/tests/utils/requests/check-api-params.ts | |
parent | eec63bbc0f4fdb39e56f37127b35c449f90a135f (diff) | |
download | PeerTube-93e4a311f37d7fc82ec81190553f8beae28fdef5.tar.gz PeerTube-93e4a311f37d7fc82ec81190553f8beae28fdef5.tar.zst PeerTube-93e4a311f37d7fc82ec81190553f8beae28fdef5.zip |
Improve check jobs parameters tests
Diffstat (limited to 'server/tests/utils/requests/check-api-params.ts')
-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 | }) |