aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/users')
-rw-r--r--server/tests/api/users/users.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts
index db82e8fc2..7ba04a4ca 100644
--- a/server/tests/api/users/users.ts
+++ b/server/tests/api/users/users.ts
@@ -40,7 +40,7 @@ import {
40 getVideoAbusesList, updateCustomSubConfig, getCustomConfig, waitJobs 40 getVideoAbusesList, updateCustomSubConfig, getCustomConfig, waitJobs
41} from '../../../../shared/extra-utils' 41} from '../../../../shared/extra-utils'
42import { follow } from '../../../../shared/extra-utils/server/follows' 42import { follow } from '../../../../shared/extra-utils/server/follows'
43import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' 43import { setAccessTokensToServers, logout } from '../../../../shared/extra-utils/users/login'
44import { getMyVideos } from '../../../../shared/extra-utils/videos/videos' 44import { getMyVideos } from '../../../../shared/extra-utils/videos/videos'
45import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' 45import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
46import { CustomConfig } from '@shared/models/server' 46import { CustomConfig } from '@shared/models/server'
@@ -205,11 +205,17 @@ describe('Test users', function () {
205 }) 205 })
206 206
207 describe('Logout', function () { 207 describe('Logout', function () {
208 it('Should logout (revoke token)') 208 it('Should logout (revoke token)', async function () {
209 await logout(server.url, server.accessToken)
210 })
209 211
210 it('Should not be able to get the user information') 212 it('Should not be able to get the user information', async function () {
213 await getMyUserInformation(server.url, server.accessToken, 401)
214 })
211 215
212 it('Should not be able to upload a video') 216 it('Should not be able to upload a video', async function () {
217 await uploadVideo(server.url, server.accessToken, { name: 'video' }, 401)
218 })
213 219
214 it('Should not be able to remove a video') 220 it('Should not be able to remove a video')
215 221