aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/debug.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-12-07 14:32:36 +0100
committerGitHub <noreply@github.com>2020-12-07 14:32:36 +0100
commit2d53be0267acc49cda46707b885096193a1f4e9c (patch)
tree887061a34bc67f40acbb96a6278f9544bf83caeb /server/tests/api/check-params/debug.ts
parentadc1f09c0dbd997f34028c1c82d1c118dc8ead80 (diff)
downloadPeerTube-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/debug.ts')
-rw-r--r--server/tests/api/check-params/debug.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/tests/api/check-params/debug.ts b/server/tests/api/check-params/debug.ts
index 5fac73485..37bf0f99b 100644
--- a/server/tests/api/check-params/debug.ts
+++ b/server/tests/api/check-params/debug.ts
@@ -11,6 +11,7 @@ import {
11 userLogin 11 userLogin
12} from '../../../../shared/extra-utils' 12} from '../../../../shared/extra-utils'
13import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests' 13import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests'
14import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
14 15
15describe('Test debug API validators', function () { 16describe('Test debug API validators', function () {
16 const path = '/api/v1/server/debug' 17 const path = '/api/v1/server/debug'
@@ -40,7 +41,7 @@ describe('Test debug API validators', function () {
40 await makeGetRequest({ 41 await makeGetRequest({
41 url: server.url, 42 url: server.url,
42 path, 43 path,
43 statusCodeExpected: 401 44 statusCodeExpected: HttpStatusCode.UNAUTHORIZED_401
44 }) 45 })
45 }) 46 })
46 47
@@ -49,7 +50,7 @@ describe('Test debug API validators', function () {
49 url: server.url, 50 url: server.url,
50 path, 51 path,
51 token: userAccessToken, 52 token: userAccessToken,
52 statusCodeExpected: 403 53 statusCodeExpected: HttpStatusCode.FORBIDDEN_403
53 }) 54 })
54 }) 55 })
55 56
@@ -59,7 +60,7 @@ describe('Test debug API validators', function () {
59 path, 60 path,
60 token: server.accessToken, 61 token: server.accessToken,
61 query: { startDate: new Date().toISOString() }, 62 query: { startDate: new Date().toISOString() },
62 statusCodeExpected: 200 63 statusCodeExpected: HttpStatusCode.OK_200
63 }) 64 })
64 }) 65 })
65 }) 66 })