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) --- shared/extra-utils/server/contact-form.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shared/extra-utils/server/contact-form.ts') diff --git a/shared/extra-utils/server/contact-form.ts b/shared/extra-utils/server/contact-form.ts index d50f83241..6c9232cc6 100644 --- a/shared/extra-utils/server/contact-form.ts +++ b/shared/extra-utils/server/contact-form.ts @@ -1,5 +1,6 @@ import * as request from 'supertest' import { ContactForm } from '../../models/server' +import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' function sendContactForm (options: { url: string @@ -20,7 +21,7 @@ function sendContactForm (options: { return request(options.url) .post(path) .send(body) - .expect(options.expectedStatus || 204) + .expect(options.expectedStatus || HttpStatusCode.NO_CONTENT_204) } // --------------------------------------------------------------------------- -- cgit v1.2.3