mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
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:
parent
7af247f1d9
commit
e89aff1272
@ -16,7 +16,7 @@ module.exports = {
|
|||||||
wasInvited: 'boolean',
|
wasInvited: 'boolean',
|
||||||
wasSeeded: 'boolean',
|
wasSeeded: 'boolean',
|
||||||
locationName: { type: 'string', allow: [null] },
|
locationName: { type: 'string', allow: [null] },
|
||||||
about: { type: 'string', allow: [null] },
|
about: { type: 'string', allow: [null, ''] },
|
||||||
primaryEmail: {
|
primaryEmail: {
|
||||||
type: 'relationship',
|
type: 'relationship',
|
||||||
relationship: 'PRIMARY_EMAIL',
|
relationship: 'PRIMARY_EMAIL',
|
||||||
|
|||||||
@ -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 () => {
|
it('marks the EmailAddress as primary', async () => {
|
||||||
const cypher = `
|
const cypher = `
|
||||||
MATCH(email:EmailAddress)<-[:PRIMARY_EMAIL]-(u:User {name: {name}})
|
MATCH(email:EmailAddress)<-[:PRIMARY_EMAIL]-(u:User {name: {name}})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user