]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/users.ts
API: Add ability to update video channel avatar
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / users.ts
index 28537315e1f03a3e98ef022d1521d9dbcc80b58b..e1954c64f53332485d134f506b0a84f0620dba1a 100644 (file)
@@ -304,6 +304,20 @@ describe('Test users API validators', function () {
       await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches })
     })
 
+    it('Should fail with an unauthenticated user', async function () {
+      const fields = {}
+      const attaches = {
+        'avatarfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png')
+      }
+      await makeUploadRequest({
+        url: server.url,
+        path: path + '/me/avatar/pick',
+        fields,
+        attaches,
+        statusCodeExpected: 401
+      })
+    })
+
     it('Should succeed with the correct params', async function () {
       const fields = {}
       const attaches = {