aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/tests/utils/requests/check-api-params.ts
blob: fbd660629b8217a059b51cfc48d4711741606239 (plain) (tree)



































                                                                              
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
}