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:
parent
eec63bbc0f
commit
93e4a311f3
3 changed files with 30 additions and 40 deletions
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue