diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-28 13:59:22 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-28 13:59:22 +0100 |
commit | c5d31dba56d669c0df0209761c43c5a6ac7cec4a (patch) | |
tree | fe72b56a1c0e7beb6e092c393a00ddfe93a5d71f /server/tests/utils/jobs.ts | |
parent | db799da3d2b2ea465165df78ff71effa653b6309 (diff) | |
download | PeerTube-c5d31dba56d669c0df0209761c43c5a6ac7cec4a.tar.gz PeerTube-c5d31dba56d669c0df0209761c43c5a6ac7cec4a.tar.zst PeerTube-c5d31dba56d669c0df0209761c43c5a6ac7cec4a.zip |
Tests directories refractor
Diffstat (limited to 'server/tests/utils/jobs.ts')
-rw-r--r-- | server/tests/utils/jobs.ts | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/server/tests/utils/jobs.ts b/server/tests/utils/jobs.ts deleted file mode 100644 index 0a8c51575..000000000 --- a/server/tests/utils/jobs.ts +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | import * as request from 'supertest' | ||
2 | |||
3 | function getJobsList (url: string, accessToken: string) { | ||
4 | const path = '/api/v1/jobs' | ||
5 | |||
6 | return request(url) | ||
7 | .get(path) | ||
8 | .set('Accept', 'application/json') | ||
9 | .set('Authorization', 'Bearer ' + accessToken) | ||
10 | .expect(200) | ||
11 | .expect('Content-Type', /json/) | ||
12 | } | ||
13 | |||
14 | function getJobsListPaginationAndSort (url: string, accessToken: string, start: number, count: number, sort: string) { | ||
15 | const path = '/api/v1/jobs' | ||
16 | |||
17 | return request(url) | ||
18 | .get(path) | ||
19 | .query({ start }) | ||
20 | .query({ count }) | ||
21 | .query({ sort }) | ||
22 | .set('Accept', 'application/json') | ||
23 | .set('Authorization', 'Bearer ' + accessToken) | ||
24 | .expect(200) | ||
25 | .expect('Content-Type', /json/) | ||
26 | } | ||
27 | |||
28 | // --------------------------------------------------------------------------- | ||
29 | |||
30 | export { | ||
31 | getJobsList, | ||
32 | getJobsListPaginationAndSort | ||
33 | } | ||