aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-channels.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-03-30 12:06:46 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-03-31 10:29:24 +0200
commit3d527ba173a37bd61ec8ad742642bb320d12995c (patch)
tree4b2890df00b64ff6cdcf96afb652af8abcac3ff5 /server/tests/api/videos/video-channels.ts
parent714bfcc556177dce2b65a1e58babdf2488e9de13 (diff)
downloadPeerTube-3d527ba173a37bd61ec8ad742642bb320d12995c.tar.gz
PeerTube-3d527ba173a37bd61ec8ad742642bb320d12995c.tar.zst
PeerTube-3d527ba173a37bd61ec8ad742642bb320d12995c.zip
Use inner join and document code for viewr stats for channels
Diffstat (limited to 'server/tests/api/videos/video-channels.ts')
-rw-r--r--server/tests/api/videos/video-channels.ts4
1 files changed, 2 insertions, 2 deletions
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 @@
2 2
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { User, Video, VideoChannel, viewsPerTime, VideoDetails } from '../../../../shared/index' 5import { User, Video, VideoChannel, ViewsPerDate, VideoDetails } from '../../../../shared/index'
6import { 6import {
7 cleanupTests, 7 cleanupTests,
8 createUser, 8 createUser,
@@ -376,7 +376,7 @@ describe('Test video channels', function () {
376 res.body.data.forEach((channel: VideoChannel) => { 376 res.body.data.forEach((channel: VideoChannel) => {
377 expect(channel).to.haveOwnProperty('viewsPerDay') 377 expect(channel).to.haveOwnProperty('viewsPerDay')
378 expect(channel.viewsPerDay).to.have.length(30 + 1) // daysPrior + today 378 expect(channel.viewsPerDay).to.have.length(30 + 1) // daysPrior + today
379 channel.viewsPerDay.forEach((v: viewsPerTime) => { 379 channel.viewsPerDay.forEach((v: ViewsPerDate) => {
380 expect(v.date).to.be.an('string') 380 expect(v.date).to.be.an('string')
381 expect(v.views).to.equal(0) 381 expect(v.views).to.equal(0)
382 }) 382 })