aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/plugins')
-rw-r--r--server/tests/plugins/plugin-router.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/server/tests/plugins/plugin-router.ts b/server/tests/plugins/plugin-router.ts
index 9e78568cd..5392acc51 100644
--- a/server/tests/plugins/plugin-router.ts
+++ b/server/tests/plugins/plugin-router.ts
@@ -44,6 +44,27 @@ describe('Test plugin helpers', function () {
44 } 44 }
45 }) 45 })
46 46
47 it('Should check if authenticated', async function () {
48 for (const path of basePaths) {
49 const res = await makeGetRequest({
50 url: server.url,
51 path: path + 'is-authenticated',
52 token: server.accessToken,
53 statusCodeExpected: 200
54 })
55
56 expect(res.body.isAuthenticated).to.equal(undefined)
57
58 const secRes = await makeGetRequest({
59 url: server.url,
60 path: path + 'is-authenticated',
61 statusCodeExpected: 200
62 })
63
64 expect(secRes.body.isAuthenticated).to.equal(false)
65 }
66 })
67
47 it('Should mirror post body', async function () { 68 it('Should mirror post body', async function () {
48 const body = { 69 const body = {
49 hello: 'world', 70 hello: 'world',