Specs tests run through cleanly

This commit is contained in:
ogerly 2019-08-22 13:26:51 +02:00
parent c00f281e6c
commit 0bb71cfbb3
2 changed files with 14 additions and 5 deletions

View File

@ -89,8 +89,10 @@ describe('slugify', () => {
})
describe('SignupVerification', () => {
const mutation = `mutation($password: String!, $email: String!, $name: String!, $slug: String, $nonce: String!) {
SignupVerification(email: $email, password: $password, name: $name, slug: $slug, nonce: $nonce) { slug }
const mutation = `mutation($password: String!, $email: String!, $name: String!, $slug: String, $nonce: String!, $termsAndConditionsAgreedVersion: String!) {
SignupVerification(email: $email, password: $password, name: $name, slug: $slug, nonce: $nonce, termsAndConditionsAgreedVersion: $termsAndConditionsAgreedVersion) {
slug
}
}
`
@ -98,7 +100,12 @@ describe('slugify', () => {
// required for SignupVerification
await instance.create('EmailAddress', { email: '123@example.org', nonce: '123456' })
const defaultVariables = { nonce: '123456', password: 'yo', email: '123@example.org' }
const defaultVariables = {
nonce: '123456',
password: 'yo',
email: '123@example.org',
termsAndConditionsAgreedVersion: '0.0.1',
}
return authenticatedClient.request(mutation, { ...defaultVariables, ...variables })
}

View File

@ -34,6 +34,7 @@ describe('CreateInvitationCode', () => {
name: 'Inviter',
email: 'inviter@example.org',
password: '1234',
termsAndConditionsAgreedVersion: '0.0.1',
}
action = async () => {
const factory = Factory()
@ -293,8 +294,8 @@ describe('Signup', () => {
describe('SignupVerification', () => {
const mutation = `
mutation($name: String!, $password: String!, $email: String!, $nonce: String!) {
SignupVerification(name: $name, password: $password, email: $email, nonce: $nonce) {
mutation($name: String!, $password: String!, $email: String!, $nonce: String!, $termsAndConditionsAgreedVersion: String!) {
SignupVerification(name: $name, password: $password, email: $email, nonce: $nonce, termsAndConditionsAgreedVersion: $termsAndConditionsAgreedVersion) {
id
}
}
@ -305,6 +306,7 @@ describe('SignupVerification', () => {
name: 'John Doe',
password: '123',
email: 'john@example.org',
termsAndConditionsAgreedVersion: '0.0.1',
}
describe('unauthenticated', () => {