]>
Commit | Line | Data |
---|---|---|
1 | import { makeGetRequest } from './requests' | |
2 | ||
3 | function checkBadStartPagination (url: string, path: string, token?: string) { | |
4 | return makeGetRequest({ | |
5 | url, | |
6 | path, | |
7 | token, | |
8 | query: { start: 'hello' }, | |
9 | statusCodeExpected: 400 | |
10 | }) | |
11 | } | |
12 | ||
13 | function checkBadCountPagination (url: string, path: string, token?: string) { | |
14 | return makeGetRequest({ | |
15 | url, | |
16 | path, | |
17 | token, | |
18 | query: { count: 'hello' }, | |
19 | statusCodeExpected: 400 | |
20 | }) | |
21 | } | |
22 | ||
23 | function checkBadSortPagination (url: string, path: string, token?: string) { | |
24 | return makeGetRequest({ | |
25 | url, | |
26 | path, | |
27 | token, | |
28 | query: { sort: 'hello' }, | |
29 | statusCodeExpected: 400 | |
30 | }) | |
31 | } | |
32 | ||
33 | // --------------------------------------------------------------------------- | |
34 | ||
35 | export { | |
36 | checkBadStartPagination, | |
37 | checkBadCountPagination, | |
38 | checkBadSortPagination | |
39 | } |