WIP
This commit is contained in:
@@ -1,16 +1,9 @@
|
|||||||
import { User } from '.';
|
import { flushdb, seed } from '../test/support';
|
||||||
|
|
||||||
import { flushdb, sequelize } from '../test/support';
|
|
||||||
|
|
||||||
beforeEach(flushdb);
|
beforeEach(flushdb);
|
||||||
|
|
||||||
it('should set JWT secret and password digest', async () => {
|
it('should set JWT secret and password digest', async () => {
|
||||||
const user = User.build({
|
const { user } = await seed();
|
||||||
username: 'user',
|
|
||||||
name: 'User',
|
|
||||||
email: 'user1@example.com',
|
|
||||||
password: 'test123!',
|
|
||||||
});
|
|
||||||
await user.save();
|
await user.save();
|
||||||
|
|
||||||
expect(user.passwordDigest).toBeTruthy();
|
expect(user.passwordDigest).toBeTruthy();
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ const seed = async () => {
|
|||||||
type: 'atlas',
|
type: 'atlas',
|
||||||
});
|
});
|
||||||
|
|
||||||
let document = await Document.create({
|
const document = await Document.create({
|
||||||
parentDocumentId: null,
|
parentDocumentId: null,
|
||||||
atlasId: collection.id,
|
atlasId: collection.id,
|
||||||
teamId: collection.teamId,
|
teamId: team.id,
|
||||||
userId: collection.creatorId,
|
userId: collection.creatorId,
|
||||||
lastModifiedById: collection.creatorId,
|
lastModifiedById: collection.creatorId,
|
||||||
createdById: collection.creatorId,
|
createdById: collection.creatorId,
|
||||||
|
|||||||
Reference in New Issue
Block a user