diff --git a/backend/src/schema/resolvers/registration.spec.js b/backend/src/schema/resolvers/registration.spec.js index 63dc35519..ea618b32e 100644 --- a/backend/src/schema/resolvers/registration.spec.js +++ b/backend/src/schema/resolvers/registration.spec.js @@ -15,7 +15,8 @@ beforeEach(async () => { variables = {} }) -beforeAll(() => { +beforeAll(async () => { + await cleanDatabase() const { server } = createServer({ context: () => { return { @@ -34,8 +35,8 @@ afterEach(async () => { describe('Signup', () => { const mutation = gql` - mutation($email: String!) { - Signup(email: $email) { + mutation($email: String!, $inviteCode: String) { + Signup(email: $email, inviteCode: $inviteCode) { email } } diff --git a/backend/src/schema/types/type/EmailAddress.gql b/backend/src/schema/types/type/EmailAddress.gql index 3808d1937..ef9de9e47 100644 --- a/backend/src/schema/types/type/EmailAddress.gql +++ b/backend/src/schema/types/type/EmailAddress.gql @@ -9,7 +9,7 @@ type Query { } type Mutation { - Signup(email: String!, inviteCode: String): EmailAddress + Signup(email: String!, inviteCode: String = null): EmailAddress SignupVerification( nonce: String! email: String!