X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-change-ownership.ts;h=fad4c8b1fb036c8934a8a32dc6cfebb29e0bd1b7;hb=819b656439e5f0ec2ae5de9357502cdfe3196197;hp=dee6575b92f6f078943333ca0873f36dc175ac34;hpb=c2777c1dfe688c8fab1ef2fed50e360100fa9198;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-change-ownership.ts b/server/tests/api/videos/video-change-ownership.ts index dee6575b9..fad4c8b1f 100644 --- a/server/tests/api/videos/video-change-ownership.ts +++ b/server/tests/api/videos/video-change-ownership.ts @@ -23,6 +23,7 @@ import { import { waitJobs } from '../../../../shared/extra-utils/server/jobs' import { User } from '../../../../shared/models/users' import { VideoDetails } from '../../../../shared/models/videos' +import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' const expect = chai.expect @@ -140,7 +141,7 @@ describe('Test video change ownership - nominal', function () { it('Should not be possible to refuse the change of ownership from first user', async function () { this.timeout(10000) - await refuseChangeOwnership(servers[0].url, firstUserAccessToken, lastRequestChangeOwnershipId, 403) + await refuseChangeOwnership(servers[0].url, firstUserAccessToken, lastRequestChangeOwnershipId, HttpStatusCode.FORBIDDEN_403) }) it('Should be possible to refuse the change of ownership from second user', async function () { @@ -177,7 +178,7 @@ describe('Test video change ownership - nominal', function () { const secondUserInformationResponse = await getMyUserInformation(servers[0].url, secondUserAccessToken) const secondUserInformation: User = secondUserInformationResponse.body const channelId = secondUserInformation.videoChannels[0].id - await acceptChangeOwnership(servers[0].url, firstUserAccessToken, lastRequestChangeOwnershipId, channelId, 403) + await acceptChangeOwnership(servers[0].url, firstUserAccessToken, lastRequestChangeOwnershipId, channelId, HttpStatusCode.FORBIDDEN_403) }) it('Should be possible to accept the change of ownership from second user', async function () { @@ -294,7 +295,14 @@ describe('Test video change ownership - quota too small', function () { const secondUserInformationResponse = await getMyUserInformation(server.url, secondUserAccessToken) const secondUserInformation: User = secondUserInformationResponse.body const channelId = secondUserInformation.videoChannels[0].id - await acceptChangeOwnership(server.url, secondUserAccessToken, lastRequestChangeOwnershipId, channelId, 403) + + await acceptChangeOwnership( + server.url, + secondUserAccessToken, + lastRequestChangeOwnershipId, + channelId, + HttpStatusCode.PAYLOAD_TOO_LARGE_413 + ) }) after(async function () {