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/plugins/plugin-helpers.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/plugins/plugin-helpers.ts')
-rw-r--r-- | server/tests/plugins/plugin-helpers.ts | 3 |
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' |
17 | import { cleanupTests, flushAndRunMultipleServers, ServerInfo, waitUntilLog } from '../../../shared/extra-utils/server/servers' | 17 | import { cleanupTests, flushAndRunMultipleServers, ServerInfo, waitUntilLog } from '../../../shared/extra-utils/server/servers' |
18 | import { expect } from 'chai' | 18 | import { expect } from 'chai' |
19 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
19 | 20 | ||
20 | function postCommand (server: ServerInfo, command: string, bodyArg?: object) { | 21 | function 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 | ||