X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fplugins%2Ffilter-hooks.ts;h=c82025f6ad81295c0c837396b901824e6d9acd20;hb=7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0;hp=b5e29d298580673f6e27d7983ff0f51d0563ac49;hpb=d0a0fa429d4651710ed951a3c11af0219e408964;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts index b5e29d298..c82025f6a 100644 --- a/server/tests/plugins/filter-hooks.ts +++ b/server/tests/plugins/filter-hooks.ts @@ -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') })