aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-28 14:40:11 +0100
committerChocobozzz <me@florianbigard.com>2017-12-28 14:40:11 +0100
commit93e4a311f37d7fc82ec81190553f8beae28fdef5 (patch)
treebced0a69b51d0bab35b01bfede629eef60ce3675 /server/tests/utils
parenteec63bbc0f4fdb39e56f37127b35c449f90a135f (diff)
downloadPeerTube-93e4a311f37d7fc82ec81190553f8beae28fdef5.tar.gz
PeerTube-93e4a311f37d7fc82ec81190553f8beae28fdef5.tar.zst
PeerTube-93e4a311f37d7fc82ec81190553f8beae28fdef5.zip
Improve check jobs parameters tests
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/requests/check-api-params.ts9
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 @@
1import { makeGetRequest } from './requests' 1import { makeGetRequest } from './requests'
2 2
3function checkBadStartPagination (url: string, path: string) { 3function 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
12function checkBadCountPagination (url: string, path: string) { 13function 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
21function checkBadSortPagination (url: string, path: string) { 23function 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 })