aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-29 11:29:23 +0200
committerChocobozzz <me@florianbigard.com>2018-06-29 11:29:23 +0200
commit4bbfc6c606c8d3794bae25c64c516120af41f4eb (patch)
tree8d6012f3c04e55e7325e3f00eb9061776cc7a953 /server/tests/api/check-params/users.ts
parent3ff5a19b4c988d6c712b7ce63c4cf04f99d047ce (diff)
downloadPeerTube-4bbfc6c606c8d3794bae25c64c516120af41f4eb.tar.gz
PeerTube-4bbfc6c606c8d3794bae25c64c516120af41f4eb.tar.zst
PeerTube-4bbfc6c606c8d3794bae25c64c516120af41f4eb.zip
API: Add ability to update video channel avatar
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r--server/tests/api/check-params/users.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 28537315e..e1954c64f 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -304,6 +304,20 @@ describe('Test users API validators', function () {
304 await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) 304 await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches })
305 }) 305 })
306 306
307 it('Should fail with an unauthenticated user', async function () {
308 const fields = {}
309 const attaches = {
310 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png')
311 }
312 await makeUploadRequest({
313 url: server.url,
314 path: path + '/me/avatar/pick',
315 fields,
316 attaches,
317 statusCodeExpected: 401
318 })
319 })
320
307 it('Should succeed with the correct params', async function () { 321 it('Should succeed with the correct params', async function () {
308 const fields = {} 322 const fields = {}
309 const attaches = { 323 const attaches = {