mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix unauthenticated signup
This commit is contained in:
parent
1639726130
commit
170a9d1531
@ -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!' }],
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user