diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-14 17:56:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-14 18:01:23 +0200 |
commit | a76138ff56ad3ad2df926f59578a06b22fb1f93c (patch) | |
tree | 2b97808cbb492af2356beb26d02749223abc6154 /server/tests/api/users/users.ts | |
parent | 614d1ae928ec307b708c4a3eb423797353b1df2a (diff) | |
download | PeerTube-a76138ff56ad3ad2df926f59578a06b22fb1f93c.tar.gz PeerTube-a76138ff56ad3ad2df926f59578a06b22fb1f93c.tar.zst PeerTube-a76138ff56ad3ad2df926f59578a06b22fb1f93c.zip |
Add quota used in users list
Diffstat (limited to 'server/tests/api/users/users.ts')
-rw-r--r-- | server/tests/api/users/users.ts | 8 |
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 | ||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { UserRole } from '../../../../shared/index' | 5 | import { User, UserRole } from '../../../../shared/index' |
6 | import { | 6 | import { |
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 () { |