aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/server/jobs.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/tests/utils/server/jobs.ts b/server/tests/utils/server/jobs.ts
index 0a8c51575..4053dd40b 100644
--- a/server/tests/utils/server/jobs.ts
+++ b/server/tests/utils/server/jobs.ts
@@ -1,7 +1,8 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2import { JobState } from '../../../../shared/models'
2 3
3function getJobsList (url: string, accessToken: string) { 4function getJobsList (url: string, accessToken: string, state: JobState) {
4 const path = '/api/v1/jobs' 5 const path = '/api/v1/jobs/' + state
5 6
6 return request(url) 7 return request(url)
7 .get(path) 8 .get(path)
@@ -11,8 +12,8 @@ function getJobsList (url: string, accessToken: string) {
11 .expect('Content-Type', /json/) 12 .expect('Content-Type', /json/)
12} 13}
13 14
14function getJobsListPaginationAndSort (url: string, accessToken: string, start: number, count: number, sort: string) { 15function getJobsListPaginationAndSort (url: string, accessToken: string, state: JobState, start: number, count: number, sort: string) {
15 const path = '/api/v1/jobs' 16 const path = '/api/v1/jobs/' + state
16 17
17 return request(url) 18 return request(url)
18 .get(path) 19 .get(path)