Fix total videos stats

This commit is contained in:
Chocobozzz
2020-03-13 13:43:26 +01:00
parent 8c966daab3
commit baab47ca81
3 changed files with 30 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ import {
doubleFollow,
flushAndRunMultipleServers,
follow,
ServerInfo,
ServerInfo, unfollow,
uploadVideo,
viewVideo,
wait
@@ -95,6 +95,16 @@ describe('Test stats (excluding redundancy)', function () {
expect(data.totalInstanceFollowers).to.equal(0)
})
it('Should have the correct total videos stats after an unfollow', async function () {
await unfollow(servers[2].url, servers[2].accessToken, servers[0])
await waitJobs(servers)
const res = await getStats(servers[2].url)
const data: ServerStats = res.body
expect(data.totalVideos).to.equal(0)
})
after(async function () {
await cleanupTests(servers)
})