From 6290699080cbcc5e454982c55a451ee23223ee2c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 22 Apr 2021 15:16:35 +0200 Subject: Fix plugin helpers tests --- server/tests/plugins/plugin-helpers.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'server/tests/plugins') diff --git a/server/tests/plugins/plugin-helpers.ts b/server/tests/plugins/plugin-helpers.ts index 2ac070b41..20020ec41 100644 --- a/server/tests/plugins/plugin-helpers.ts +++ b/server/tests/plugins/plugin-helpers.ts @@ -117,13 +117,11 @@ describe('Test plugin helpers', function () { describe('User', function () { it('Should not get a user if not authenticated', async function () { - const res = await makeGetRequest({ + await makeGetRequest({ url: servers[0].url, path: '/plugins/test-four/router/user', - statusCodeExpected: HttpStatusCode.OK_200 + statusCodeExpected: HttpStatusCode.NOT_FOUND_404 }) - - expect(res.body.user).to.be.undefined }) it('Should get a user if authenticated', async function () { @@ -134,7 +132,6 @@ describe('Test plugin helpers', function () { statusCodeExpected: HttpStatusCode.OK_200 }) - expect(res.body.user).to.exist expect(res.body.username).to.equal('root') expect(res.body.isAdmin).to.be.true expect(res.body.isModerator).to.be.false -- cgit v1.2.3