aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-22 16:07:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-05-04 16:21:39 +0200
commit7fed637506043e4432cbebe041ada0625171cceb (patch)
tree07f174e17c4b4a0b3d43a0fa6944865c06234338 /server/tests/api/users
parent8d4197637868d5cde49434e937186b57e40f4b2b (diff)
downloadPeerTube-7fed637506043e4432cbebe041ada0625171cceb.tar.gz
PeerTube-7fed637506043e4432cbebe041ada0625171cceb.tar.zst
PeerTube-7fed637506043e4432cbebe041ada0625171cceb.zip
Begin auth plugin support
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