]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/users.ts
Add CLI plugins tests
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / users.ts
index 5d62fe2b391da2b38d6b677bfc987c1c66ac2d90..5b788e328fd051728b4d8e2bd5a6352b8b786418 100644 (file)
@@ -387,13 +387,24 @@ describe('Test users API validators', function () {
       }
     })
 
+    it('Should fail with an invalid theme', async function () {
+      const fields = { theme: 'invalid' }
+      await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
+    })
+
+    it('Should fail with an unknown theme', async function () {
+      const fields = { theme: 'peertube-theme-unknown' }
+      await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
+    })
+
     it('Should succeed to change password with the correct params', async function () {
       const fields = {
         currentPassword: 'my super password',
         password: 'my super password',
         nsfwPolicy: 'blur',
         autoPlayVideo: false,
-        email: 'super_email@example.com'
+        email: 'super_email@example.com',
+        theme: 'default'
       }
 
       await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields, statusCodeExpected: 204 })