aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-14 17:56:51 +0200
committerChocobozzz <me@florianbigard.com>2018-08-14 18:01:23 +0200
commita76138ff56ad3ad2df926f59578a06b22fb1f93c (patch)
tree2b97808cbb492af2356beb26d02749223abc6154 /server/tests/api/users
parent614d1ae928ec307b708c4a3eb423797353b1df2a (diff)
downloadPeerTube-a76138ff56ad3ad2df926f59578a06b22fb1f93c.tar.gz
PeerTube-a76138ff56ad3ad2df926f59578a06b22fb1f93c.tar.zst
PeerTube-a76138ff56ad3ad2df926f59578a06b22fb1f93c.zip
Add quota used in users list
Diffstat (limited to 'server/tests/api/users')
-rw-r--r--server/tests/api/users/users.ts8
1 files changed, 7 insertions, 1 deletions
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 @@
2 2
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { UserRole } from '../../../../shared/index' 5import { User, UserRole } from '../../../../shared/index'
6import { 6import {
7 createUser, flushTests, getBlacklistedVideosList, getMyUserInformation, getMyUserVideoQuotaUsed, getMyUserVideoRating, 7 createUser, flushTests, getBlacklistedVideosList, getMyUserInformation, getMyUserVideoQuotaUsed, getMyUserVideoRating,
8 getUserInformation, getUsersList, getUsersListPaginationAndSort, getVideosList, killallServers, login, makePutBodyRequest, rateVideo, 8 getUserInformation, getUsersList, getUsersListPaginationAndSort, getVideosList, killallServers, login, makePutBodyRequest, rateVideo,
@@ -192,6 +192,12 @@ describe('Test users', function () {
192 const data = res.body 192 const data = res.body
193 193
194 expect(data.videoQuotaUsed).to.equal(218910) 194 expect(data.videoQuotaUsed).to.equal(218910)
195
196 const resUsers = await getUsersList(server.url, server.accessToken)
197
198 const users: User[] = resUsers.body.data
199 const tmpUser = users.find(u => u.username === user.username)
200 expect(tmpUser.videoQuotaUsed).to.equal(218910)
195 }) 201 })
196 202
197 it('Should be able to list my videos', async function () { 203 it('Should be able to list my videos', async function () {