From 170a9d1531f3e1dc112aba2edc8f6f7a79d05b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 22 Mar 2021 15:51:36 +0100 Subject: [PATCH] Fix unauthenticated signup --- backend/src/schema/resolvers/registration.spec.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/schema/resolvers/registration.spec.js b/backend/src/schema/resolvers/registration.spec.js index ea618b32e..c8b71deb9 100644 --- a/backend/src/schema/resolvers/registration.spec.js +++ b/backend/src/schema/resolvers/registration.spec.js @@ -3,6 +3,7 @@ import { gql } from '../../helpers/jest' import { getDriver, getNeode } from '../../db/neo4j' import createServer from '../../server' import { createTestClient } from 'apollo-server-testing' +import CONFIG from '../../config' const neode = getNeode() @@ -51,6 +52,8 @@ describe('Signup', () => { }) it('throws AuthorizationError', async () => { + CONFIG.INVITE_REGISTRATION = false + CONFIG.PUBLIC_REGISTRATION = false await expect(mutate({ mutation, variables })).resolves.toMatchObject({ errors: [{ message: 'Not Authorised!' }], })