aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/plugin-helpers.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/plugins/plugin-helpers.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/plugins/plugin-helpers.ts')
-rw-r--r--server/tests/plugins/plugin-helpers.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/tests/plugins/plugin-helpers.ts b/server/tests/plugins/plugin-helpers.ts
index e76d7917a..c0d95e1e0 100644
--- a/server/tests/plugins/plugin-helpers.ts
+++ b/server/tests/plugins/plugin-helpers.ts
@@ -16,6 +16,7 @@ import {
16} from '../../../shared/extra-utils' 16} from '../../../shared/extra-utils'
17import { cleanupTests, flushAndRunMultipleServers, ServerInfo, waitUntilLog } from '../../../shared/extra-utils/server/servers' 17import { cleanupTests, flushAndRunMultipleServers, ServerInfo, waitUntilLog } from '../../../shared/extra-utils/server/servers'
18import { expect } from 'chai' 18import { expect } from 'chai'
19import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
19 20
20function postCommand (server: ServerInfo, command: string, bodyArg?: object) { 21function postCommand (server: ServerInfo, command: string, bodyArg?: object) {
21 const body = { command } 22 const body = { command }
@@ -25,7 +26,7 @@ function postCommand (server: ServerInfo, command: string, bodyArg?: object) {
25 url: server.url, 26 url: server.url,
26 path: '/plugins/test-four/router/commander', 27 path: '/plugins/test-four/router/commander',
27 fields: body, 28 fields: body,
28 statusCodeExpected: 204 29 statusCodeExpected: HttpStatusCode.NO_CONTENT_204
29 }) 30 })
30} 31}
31 32