]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/plugins/filter-hooks.ts
Introduce user command
[github/Chocobozzz/PeerTube.git] / server / tests / plugins / filter-hooks.ts
index b5e29d298580673f6e27d7983ff0f51d0563ac49..c82025f6ad81295c0c837396b901824e6d9acd20 100644 (file)
@@ -17,7 +17,6 @@ import {
   ImportsCommand,
   makeRawRequest,
   PluginsCommand,
-  registerUser,
   ServerInfo,
   setAccessTokensToServers,
   setDefaultVideoChannel,
@@ -335,11 +334,15 @@ describe('Test plugin filter hooks', function () {
     })
 
     it('Should allow a signup', async function () {
-      await registerUser(servers[0].url, 'john', 'password')
+      await servers[0].usersCommand.register({ username: 'john', password: 'password' })
     })
 
     it('Should not allow a signup', async function () {
-      const res = await registerUser(servers[0].url, 'jma', 'password', HttpStatusCode.FORBIDDEN_403)
+      const res = await servers[0].usersCommand.register({
+        username: 'jma',
+        password: 'password',
+        expectedStatus: HttpStatusCode.FORBIDDEN_403
+      })
 
       expect(res.body.error).to.equal('No jma')
     })