From 7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 13 Jul 2021 14:23:01 +0200 Subject: Introduce user command --- server/tests/plugins/filter-hooks.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'server/tests/plugins/filter-hooks.ts') 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') }) -- cgit v1.2.3