From a76138ff56ad3ad2df926f59578a06b22fb1f93c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 14 Aug 2018 17:56:51 +0200 Subject: Add quota used in users list --- server/tests/api/users/users.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'server/tests') diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index 77aa00f60..04dcc8fd1 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts @@ -2,7 +2,7 @@ import * as chai from 'chai' import 'mocha' -import { UserRole } from '../../../../shared/index' +import { User, UserRole } from '../../../../shared/index' import { createUser, flushTests, getBlacklistedVideosList, getMyUserInformation, getMyUserVideoQuotaUsed, getMyUserVideoRating, getUserInformation, getUsersList, getUsersListPaginationAndSort, getVideosList, killallServers, login, makePutBodyRequest, rateVideo, @@ -192,6 +192,12 @@ describe('Test users', function () { const data = res.body expect(data.videoQuotaUsed).to.equal(218910) + + const resUsers = await getUsersList(server.url, server.accessToken) + + const users: User[] = resUsers.body.data + const tmpUser = users.find(u => u.username === user.username) + expect(tmpUser.videoQuotaUsed).to.equal(218910) }) it('Should be able to list my videos', async function () { -- cgit v1.2.3