mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Refactor create user with defined about
This commit is contained in:
parent
fb879f96b6
commit
b45e4b5990
@ -65,7 +65,6 @@ Factory.define('basicUser')
|
||||
name: faker.name.findName,
|
||||
password: '1234',
|
||||
role: 'user',
|
||||
about: faker.lorem.paragraph,
|
||||
termsAndConditionsAgreedVersion: '0.0.1',
|
||||
termsAndConditionsAgreedAt: '2019-08-01T10:47:19.212Z',
|
||||
allowEmbedIframes: false,
|
||||
@ -82,12 +81,28 @@ Factory.define('basicUser')
|
||||
|
||||
Factory.define('userWithoutEmailAddress')
|
||||
.extend('basicUser')
|
||||
.option('about', faker.lorem.paragraph)
|
||||
.after(async (buildObject, options) => {
|
||||
return neode.create('User', buildObject)
|
||||
})
|
||||
|
||||
Factory.define('userWithAboutNull')
|
||||
.extend('basicUser')
|
||||
.option('about', null)
|
||||
.after(async (buildObject, options) => {
|
||||
return neode.create('User', buildObject)
|
||||
})
|
||||
|
||||
Factory.define('userWithAboutEmpty')
|
||||
.extend('basicUser')
|
||||
.option('about', '')
|
||||
.after(async (buildObject, options) => {
|
||||
return neode.create('User', buildObject)
|
||||
})
|
||||
|
||||
Factory.define('user')
|
||||
.extend('basicUser')
|
||||
.option('about', faker.lorem.paragraph)
|
||||
.option('email', faker.internet.exampleEmail)
|
||||
.option('avatar', () =>
|
||||
Factory.build('image', {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user