aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/users.ts')
-rw-r--r--server/tests/api/users.ts15
1 files changed, 14 insertions, 1 deletions
diff --git a/server/tests/api/users.ts b/server/tests/api/users.ts
index bdef62c46..6f40ca3c9 100644
--- a/server/tests/api/users.ts
+++ b/server/tests/api/users.ts
@@ -31,6 +31,7 @@ import {
31 getBlacklistedVideosList 31 getBlacklistedVideosList
32} from '../utils' 32} from '../utils'
33import { UserRole } from '../../../shared' 33import { UserRole } from '../../../shared'
34import { getMyVideos } from '../utils/videos'
34 35
35describe('Test users', function () { 36describe('Test users', function () {
36 let server: ServerInfo 37 let server: ServerInfo
@@ -197,10 +198,22 @@ describe('Test users', function () {
197 it('Should be able to upload a video with this user', async function () { 198 it('Should be able to upload a video with this user', async function () {
198 this.timeout(5000) 199 this.timeout(5000)
199 200
200 const videoAttributes = {} 201 const videoAttributes = {
202 name: 'super user video'
203 }
201 await uploadVideo(server.url, accessTokenUser, videoAttributes) 204 await uploadVideo(server.url, accessTokenUser, videoAttributes)
202 }) 205 })
203 206
207 it('Should be able to list my videos', async function () {
208 const res = await getMyVideos(server.url, accessTokenUser, 0, 5)
209 expect(res.body.total).to.equal(1)
210
211 const videos = res.body.data
212 expect(videos).to.have.lengthOf(1)
213
214 expect(videos[0].name).to.equal('super user video')
215 })
216
204 it('Should list all the users', async function () { 217 it('Should list all the users', async function () {
205 const res = await getUsersList(server.url) 218 const res = await getUsersList(server.url)
206 const result = res.body 219 const result = res.body