From 2d53be0267acc49cda46707b885096193a1f4e9c Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 7 Dec 2020 14:32:36 +0100 Subject: replace numbers with typed http status codes (#3409) --- server/tests/plugins/plugin-router.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'server/tests/plugins/plugin-router.ts') diff --git a/server/tests/plugins/plugin-router.ts b/server/tests/plugins/plugin-router.ts index cf4130f4b..9e78568cd 100644 --- a/server/tests/plugins/plugin-router.ts +++ b/server/tests/plugins/plugin-router.ts @@ -10,6 +10,7 @@ import { setAccessTokensToServers, uninstallPlugin } from '../../../shared/extra-utils' import { expect } from 'chai' +import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' describe('Test plugin helpers', function () { let server: ServerInfo @@ -36,7 +37,7 @@ describe('Test plugin helpers', function () { const res = await makeGetRequest({ url: server.url, path: path + 'ping', - statusCodeExpected: 200 + statusCodeExpected: HttpStatusCode.OK_200 }) expect(res.body.message).to.equal('pong') @@ -55,7 +56,7 @@ describe('Test plugin helpers', function () { url: server.url, path: path + 'form/post/mirror', fields: body, - statusCodeExpected: 200 + statusCodeExpected: HttpStatusCode.OK_200 }) expect(res.body).to.deep.equal(body) @@ -73,14 +74,14 @@ describe('Test plugin helpers', function () { await makeGetRequest({ url: server.url, path: path + 'ping', - statusCodeExpected: 404 + statusCodeExpected: HttpStatusCode.NOT_FOUND_404 }) await makePostBodyRequest({ url: server.url, path: path + 'ping', fields: {}, - statusCodeExpected: 404 + statusCodeExpected: HttpStatusCode.NOT_FOUND_404 }) } }) -- cgit v1.2.3