Fix bug where about must not be empty string

- add test case to test this use case since it is the default from our
UI
This commit is contained in:
mattwr18 2019-09-18 13:09:33 +02:00
parent 7af247f1d9
commit e89aff1272
2 changed files with 12 additions and 1 deletions

View File

@ -16,7 +16,7 @@ module.exports = {
wasInvited: 'boolean',
wasSeeded: 'boolean',
locationName: { type: 'string', allow: [null] },
about: { type: 'string', allow: [null] },
about: { type: 'string', allow: [null, ''] },
primaryEmail: {
type: 'relationship',
relationship: 'PRIMARY_EMAIL',

View File

@ -484,6 +484,17 @@ describe('SignupVerification', () => {
})
})
it('allowing the about field to be an empty string', async () => {
variables = { ...variables, about: '' }
await expect(mutate({ mutation, variables })).resolves.toMatchObject({
data: {
SignupVerification: expect.objectContaining({
id: expect.any(String),
}),
},
})
})
it('marks the EmailAddress as primary', async () => {
const cypher = `
MATCH(email:EmailAddress)<-[:PRIMARY_EMAIL]-(u:User {name: {name}})