]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/utils/requests/check-api-params.ts
Improve check jobs parameters tests
[github/Chocobozzz/PeerTube.git] / server / tests / utils / requests / check-api-params.ts
index fbd660629b8217a059b51cfc48d4711741606239..7550eb3d8e10bd463f05bae0e78198dc2bdb9013 100644 (file)
@@ -1,27 +1,30 @@
 import { makeGetRequest } from './requests'
 
-function checkBadStartPagination (url: string, path: string) {
+function checkBadStartPagination (url: string, path: string, token?: string) {
   return makeGetRequest({
     url,
     path,
+    token,
     query: { start: 'hello' },
     statusCodeExpected: 400
   })
 }
 
-function checkBadCountPagination (url: string, path: string) {
+function checkBadCountPagination (url: string, path: string, token?: string) {
   return makeGetRequest({
     url,
     path,
+    token,
     query: { count: 'hello' },
     statusCodeExpected: 400
   })
 }
 
-function checkBadSortPagination (url: string, path: string) {
+function checkBadSortPagination (url: string, path: string, token?: string) {
   return makeGetRequest({
     url,
     path,
+    token,
     query: { sort: 'hello' },
     statusCodeExpected: 400
   })