]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/plugins.ts
Introduce server commands
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / plugins.ts
index a833fe6ffe03fdccb4b2c3ee828acf47603ddd24..8509b8ac5b8e46a8be0f4f93cdc87e53da2725ab 100644 (file)
@@ -9,8 +9,6 @@ import {
   cleanupTests,
   createUser,
   flushAndRunServer,
-  immutableAssign,
-  installPlugin,
   makeGetRequest,
   makePostBodyRequest,
   makePutBodyRequest,
@@ -50,13 +48,13 @@ describe('Test server plugins API validators', function () {
     userAccessToken = await userLogin(server, user)
 
     {
-      const res = await installPlugin({ url: server.url, accessToken: server.accessToken, npmName: npmPlugin })
+      const res = await server.pluginsCommand.install({ npmName: npmPlugin })
       const plugin = res.body as PeerTubePlugin
       npmVersion = plugin.version
     }
 
     {
-      const res = await installPlugin({ url: server.url, accessToken: server.accessToken, npmName: themePlugin })
+      const res = await server.pluginsCommand.install({ npmName: themePlugin })
       const plugin = res.body as PeerTubePlugin
       themeVersion = plugin.version
     }
@@ -201,7 +199,7 @@ describe('Test server plugins API validators', function () {
     })
 
     it('Should fail with an invalid plugin type', async function () {
-      const query = immutableAssign(baseQuery, { pluginType: 5 })
+      const query = { ...baseQuery, pluginType: 5 }
 
       await makeGetRequest({
         url: server.url,
@@ -212,7 +210,7 @@ describe('Test server plugins API validators', function () {
     })
 
     it('Should fail with an invalid current peertube engine', async function () {
-      const query = immutableAssign(baseQuery, { currentPeerTubeEngine: '1.0' })
+      const query = { ...baseQuery, currentPeerTubeEngine: '1.0' }
 
       await makeGetRequest({
         url: server.url,
@@ -272,7 +270,7 @@ describe('Test server plugins API validators', function () {
     })
 
     it('Should fail with an invalid plugin type', async function () {
-      const query = immutableAssign(baseQuery, { pluginType: 5 })
+      const query = { ...baseQuery, pluginType: 5 }
 
       await makeGetRequest({
         url: server.url,