mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
21 lines
455 B
JavaScript
21 lines
455 B
JavaScript
import Factory from '../seed/factories'
|
|
import { neode } from '../bootstrap/neo4j'
|
|
|
|
const factory = Factory()
|
|
const instance = neode()
|
|
|
|
afterEach(async () => {
|
|
await factory.cleanDatabase()
|
|
})
|
|
|
|
describe('role', () => {
|
|
it('defaults to `user`', async () => {
|
|
const user = await instance.create('User', { name: 'John' })
|
|
await expect(user.toJson()).resolves.toEqual(
|
|
expect.objectContaining({
|
|
role: 'user',
|
|
}),
|
|
)
|
|
})
|
|
})
|