1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Improve check jobs parameters tests

This commit is contained in:
Chocobozzz 2017-12-28 14:40:11 +01:00
parent eec63bbc0f
commit 93e4a311f3
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 30 additions and 40 deletions

View 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
})