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