diff options
Diffstat (limited to 'server/tests/api/check-params/jobs.ts')
-rw-r--r-- | server/tests/api/check-params/jobs.ts | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/server/tests/api/check-params/jobs.ts b/server/tests/api/check-params/jobs.ts index a370ec2d3..23d95d8e4 100644 --- a/server/tests/api/check-params/jobs.ts +++ b/server/tests/api/check-params/jobs.ts | |||
@@ -1,20 +1,17 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | |||
5 | import { | 4 | import { |
5 | checkBadCountPagination, | ||
6 | checkBadSortPagination, | ||
7 | checkBadStartPagination, | ||
6 | cleanupTests, | 8 | cleanupTests, |
7 | createSingleServer, | 9 | createSingleServer, |
10 | makeGetRequest, | ||
8 | PeerTubeServer, | 11 | PeerTubeServer, |
9 | setAccessTokensToServers | 12 | setAccessTokensToServers |
10 | } from '../../../../shared/extra-utils' | 13 | } from '@shared/extra-utils' |
11 | import { | 14 | import { HttpStatusCode } from '@shared/models' |
12 | checkBadCountPagination, | ||
13 | checkBadSortPagination, | ||
14 | checkBadStartPagination | ||
15 | } from '../../../../shared/extra-utils/requests/check-api-params' | ||
16 | import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests' | ||
17 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
18 | 15 | ||
19 | describe('Test jobs API validators', function () { | 16 | describe('Test jobs API validators', function () { |
20 | const path = '/api/v1/jobs/failed' | 17 | const path = '/api/v1/jobs/failed' |
@@ -75,7 +72,7 @@ describe('Test jobs API validators', function () { | |||
75 | await makeGetRequest({ | 72 | await makeGetRequest({ |
76 | url: server.url, | 73 | url: server.url, |
77 | path, | 74 | path, |
78 | statusCodeExpected: HttpStatusCode.UNAUTHORIZED_401 | 75 | expectedStatus: HttpStatusCode.UNAUTHORIZED_401 |
79 | }) | 76 | }) |
80 | }) | 77 | }) |
81 | 78 | ||
@@ -84,7 +81,7 @@ describe('Test jobs API validators', function () { | |||
84 | url: server.url, | 81 | url: server.url, |
85 | path, | 82 | path, |
86 | token: userAccessToken, | 83 | token: userAccessToken, |
87 | statusCodeExpected: HttpStatusCode.FORBIDDEN_403 | 84 | expectedStatus: HttpStatusCode.FORBIDDEN_403 |
88 | }) | 85 | }) |
89 | }) | 86 | }) |
90 | 87 | ||