diff options
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/users/users.ts | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index f7e5972d3..b788637e7 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -4,7 +4,8 @@ import * as chai from 'chai' | |||
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { UserRole } from '../../../../shared/index' | 5 | import { UserRole } from '../../../../shared/index' |
6 | import { | 6 | import { |
7 | createUser, flushTests, getBlacklistedVideosList, getMyUserInformation, getMyUserVideoRating, getUserInformation, getUsersList, | 7 | createUser, flushTests, getBlacklistedVideosList, getMyUserInformation, getMyUserVideoQuotaUsed, getMyUserVideoRating, getUserInformation, |
8 | getUsersList, | ||
8 | getUsersListPaginationAndSort, getVideosList, killallServers, login, makePutBodyRequest, rateVideo, registerUser, removeUser, removeVideo, | 9 | getUsersListPaginationAndSort, getVideosList, killallServers, login, makePutBodyRequest, rateVideo, registerUser, removeUser, removeVideo, |
9 | runServer, ServerInfo, serverLogin, testVideoImage, updateMyAvatar, updateMyUser, updateUser, uploadVideo | 10 | runServer, ServerInfo, serverLogin, testVideoImage, updateMyAvatar, updateMyUser, updateUser, uploadVideo |
10 | } from '../../utils/index' | 11 | } from '../../utils/index' |
@@ -179,11 +180,19 @@ describe('Test users', function () { | |||
179 | this.timeout(5000) | 180 | this.timeout(5000) |
180 | 181 | ||
181 | const videoAttributes = { | 182 | const videoAttributes = { |
182 | name: 'super user video' | 183 | name: 'super user video', |
184 | fixture: 'video_short.webm' | ||
183 | } | 185 | } |
184 | await uploadVideo(server.url, accessTokenUser, videoAttributes) | 186 | await uploadVideo(server.url, accessTokenUser, videoAttributes) |
185 | }) | 187 | }) |
186 | 188 | ||
189 | it('Should have video quota updated', async function () { | ||
190 | const res = await getMyUserVideoQuotaUsed(server.url, accessTokenUser) | ||
191 | const data = res.body | ||
192 | |||
193 | expect(data.videoQuotaUsed).to.equal(218910) | ||
194 | }) | ||
195 | |||
187 | it('Should be able to list my videos', async function () { | 196 | it('Should be able to list my videos', async function () { |
188 | const res = await getMyVideos(server.url, accessTokenUser, 0, 5) | 197 | const res = await getMyVideos(server.url, accessTokenUser, 0, 5) |
189 | expect(res.body.total).to.equal(1) | 198 | expect(res.body.total).to.equal(1) |