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

Improve check follow params tests

This commit is contained in:
Chocobozzz 2017-12-28 14:29:57 +01:00
parent c5d31dba56
commit eec63bbc0f
No known key found for this signature in database
GPG key ID: 583A612D890159BE
21 changed files with 232 additions and 150 deletions

View file

@ -0,0 +1,36 @@
import { makeGetRequest } from './requests'
function checkBadStartPagination (url: string, path: string) {
return makeGetRequest({
url,
path,
query: { start: 'hello' },
statusCodeExpected: 400
})
}
function checkBadCountPagination (url: string, path: string) {
return makeGetRequest({
url,
path,
query: { count: 'hello' },
statusCodeExpected: 400
})
}
function checkBadSortPagination (url: string, path: string) {
return makeGetRequest({
url,
path,
query: { sort: 'hello' },
statusCodeExpected: 400
})
}
// ---------------------------------------------------------------------------
export {
checkBadStartPagination,
checkBadCountPagination,
checkBadSortPagination
}