diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-12-07 14:32:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 14:32:36 +0100 |
commit | 2d53be0267acc49cda46707b885096193a1f4e9c (patch) | |
tree | 887061a34bc67f40acbb96a6278f9544bf83caeb /server/tests/api/check-params/jobs.ts | |
parent | adc1f09c0dbd997f34028c1c82d1c118dc8ead80 (diff) | |
download | PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.gz PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.zst PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.zip |
replace numbers with typed http status codes (#3409)
Diffstat (limited to 'server/tests/api/check-params/jobs.ts')
-rw-r--r-- | server/tests/api/check-params/jobs.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/tests/api/check-params/jobs.ts b/server/tests/api/check-params/jobs.ts index 8f4af8d16..3c1d2049b 100644 --- a/server/tests/api/check-params/jobs.ts +++ b/server/tests/api/check-params/jobs.ts | |||
@@ -16,6 +16,7 @@ import { | |||
16 | checkBadStartPagination | 16 | checkBadStartPagination |
17 | } from '../../../../shared/extra-utils/requests/check-api-params' | 17 | } from '../../../../shared/extra-utils/requests/check-api-params' |
18 | import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests' | 18 | import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests' |
19 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
19 | 20 | ||
20 | describe('Test jobs API validators', function () { | 21 | describe('Test jobs API validators', function () { |
21 | const path = '/api/v1/jobs/failed' | 22 | const path = '/api/v1/jobs/failed' |
@@ -76,7 +77,7 @@ describe('Test jobs API validators', function () { | |||
76 | await makeGetRequest({ | 77 | await makeGetRequest({ |
77 | url: server.url, | 78 | url: server.url, |
78 | path, | 79 | path, |
79 | statusCodeExpected: 401 | 80 | statusCodeExpected: HttpStatusCode.UNAUTHORIZED_401 |
80 | }) | 81 | }) |
81 | }) | 82 | }) |
82 | 83 | ||
@@ -85,7 +86,7 @@ describe('Test jobs API validators', function () { | |||
85 | url: server.url, | 86 | url: server.url, |
86 | path, | 87 | path, |
87 | token: userAccessToken, | 88 | token: userAccessToken, |
88 | statusCodeExpected: 403 | 89 | statusCodeExpected: HttpStatusCode.FORBIDDEN_403 |
89 | }) | 90 | }) |
90 | }) | 91 | }) |
91 | 92 | ||