aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/server/stats.ts12
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 })