diff options
author | Chocobozzz <me@florianbigard.com> | 2020-03-13 13:43:26 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-03-13 14:54:00 +0100 |
commit | baab47ca81742deae15acd671e8c332a4e1d6eb7 (patch) | |
tree | 06838db49de28a3adae14934ef2d036e33b3bb8e /server/tests | |
parent | 8c966daab30dd2bc8fd9792a8e219d94f3d8e67c (diff) | |
download | PeerTube-baab47ca81742deae15acd671e8c332a4e1d6eb7.tar.gz PeerTube-baab47ca81742deae15acd671e8c332a4e1d6eb7.tar.zst PeerTube-baab47ca81742deae15acd671e8c332a4e1d6eb7.zip |
Fix total videos stats
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/server/stats.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/server/tests/api/server/stats.ts b/server/tests/api/server/stats.ts index c207bb5f0..fe956413c 100644 --- a/server/tests/api/server/stats.ts +++ b/server/tests/api/server/stats.ts | |||
@@ -9,7 +9,7 @@ import { | |||
9 | doubleFollow, | 9 | doubleFollow, |
10 | flushAndRunMultipleServers, | 10 | flushAndRunMultipleServers, |
11 | follow, | 11 | follow, |
12 | ServerInfo, | 12 | ServerInfo, unfollow, |
13 | uploadVideo, | 13 | uploadVideo, |
14 | viewVideo, | 14 | viewVideo, |
15 | wait | 15 | wait |
@@ -95,6 +95,16 @@ describe('Test stats (excluding redundancy)', function () { | |||
95 | expect(data.totalInstanceFollowers).to.equal(0) | 95 | expect(data.totalInstanceFollowers).to.equal(0) |
96 | }) | 96 | }) |
97 | 97 | ||
98 | it('Should have the correct total videos stats after an unfollow', async function () { | ||
99 | await unfollow(servers[2].url, servers[2].accessToken, servers[0]) | ||
100 | await waitJobs(servers) | ||
101 | |||
102 | const res = await getStats(servers[2].url) | ||
103 | const data: ServerStats = res.body | ||
104 | |||
105 | expect(data.totalVideos).to.equal(0) | ||
106 | }) | ||
107 | |||
98 | after(async function () { | 108 | after(async function () { |
99 | await cleanupTests(servers) | 109 | await cleanupTests(servers) |
100 | }) | 110 | }) |