From 3d527ba173a37bd61ec8ad742642bb320d12995c Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 30 Mar 2020 12:06:46 +0200 Subject: Use inner join and document code for viewr stats for channels --- server/tests/api/videos/video-channels.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/tests') diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts index bde45584d..876a6ab66 100644 --- a/server/tests/api/videos/video-channels.ts +++ b/server/tests/api/videos/video-channels.ts @@ -2,7 +2,7 @@ import * as chai from 'chai' import 'mocha' -import { User, Video, VideoChannel, viewsPerTime, VideoDetails } from '../../../../shared/index' +import { User, Video, VideoChannel, ViewsPerDate, VideoDetails } from '../../../../shared/index' import { cleanupTests, createUser, @@ -376,7 +376,7 @@ describe('Test video channels', function () { res.body.data.forEach((channel: VideoChannel) => { expect(channel).to.haveOwnProperty('viewsPerDay') expect(channel.viewsPerDay).to.have.length(30 + 1) // daysPrior + today - channel.viewsPerDay.forEach((v: viewsPerTime) => { + channel.viewsPerDay.forEach((v: ViewsPerDate) => { expect(v.date).to.be.an('string') expect(v.views).to.equal(0) }) -- cgit v1.2.3