From f2eb23cd87cf32b8fe545178143b5f49e06a58da Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 8 Dec 2020 21:16:10 +0100 Subject: emit more specific status codes on video upload (#3423) - reduce http status codes list to potentially useful codes - convert more codes to typed ones - factorize html generator for error responses --- server/tests/api/activitypub/client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/tests/api/activitypub/client.ts') diff --git a/server/tests/api/activitypub/client.ts b/server/tests/api/activitypub/client.ts index d16f05108..b6c538e19 100644 --- a/server/tests/api/activitypub/client.ts +++ b/server/tests/api/activitypub/client.ts @@ -11,6 +11,7 @@ import { setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils' +import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' const expect = chai.expect @@ -53,7 +54,7 @@ describe('Test activitypub', function () { }) it('Should redirect to the origin video object', async function () { - const res = await makeActivityPubGetRequest(servers[1].url, '/videos/watch/' + videoUUID, 302) + const res = await makeActivityPubGetRequest(servers[1].url, '/videos/watch/' + videoUUID, HttpStatusCode.FOUND_302) expect(res.header.location).to.equal('http://localhost:' + servers[0].port + '/videos/watch/' + videoUUID) }) -- cgit v1.2.3