X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fviews.ts;h=9bf1ef6c3cf3f4a5312a5ead2a09382410c42de5;hb=ba2684ceddf9b76312635b9cddc6bf6975ce436a;hp=fe037b1455ba709cda296e229c61dbcaf1c798e3;hpb=49f0468d44468528c2fb2c8b0efd19cdaeeec43d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/views.ts b/server/tests/api/check-params/views.ts index fe037b145..9bf1ef6c3 100644 --- a/server/tests/api/check-params/views.ts +++ b/server/tests/api/check-params/views.ts @@ -64,12 +64,12 @@ describe('Test videos views', function () { }) it('Should fail without token', async function () { - await servers[0].videoStats.getOverallStats({ videoId: videoId, token: null, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 }) + await servers[0].videoStats.getOverallStats({ videoId, token: null, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 }) }) it('Should fail with another token', async function () { await servers[0].videoStats.getOverallStats({ - videoId: videoId, + videoId, token: userAccessToken, expectedStatus: HttpStatusCode.FORBIDDEN_403 }) @@ -114,7 +114,7 @@ describe('Test videos views', function () { it('Should fail without token', async function () { await servers[0].videoStats.getTimeserieStats({ - videoId: videoId, + videoId, token: null, metric: 'viewers', expectedStatus: HttpStatusCode.UNAUTHORIZED_401 @@ -123,7 +123,7 @@ describe('Test videos views', function () { it('Should fail with another token', async function () { await servers[0].videoStats.getTimeserieStats({ - videoId: videoId, + videoId, token: userAccessToken, metric: 'viewers', expectedStatus: HttpStatusCode.FORBIDDEN_403 @@ -176,7 +176,7 @@ describe('Test videos views', function () { await servers[0].videoStats.getTimeserieStats({ videoId, metric: 'viewers', - startDate: new Date('2021-04-07T08:31:57.126Z'), + startDate: new Date('2000-04-07T08:31:57.126Z'), endDate: new Date(), expectedStatus: HttpStatusCode.BAD_REQUEST_400 }) @@ -198,7 +198,7 @@ describe('Test videos views', function () { it('Should fail without token', async function () { await servers[0].videoStats.getRetentionStats({ - videoId: videoId, + videoId, token: null, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 }) @@ -206,7 +206,7 @@ describe('Test videos views', function () { it('Should fail with another token', async function () { await servers[0].videoStats.getRetentionStats({ - videoId: videoId, + videoId, token: userAccessToken, expectedStatus: HttpStatusCode.FORBIDDEN_403 })