This commit is contained in:
Tom Moor
2017-07-15 15:14:01 -07:00
parent 2a9efaba8f
commit ed7aa80a3a
2 changed files with 4 additions and 11 deletions

View File

@@ -1,16 +1,9 @@
import { User } from '.';
import { flushdb, sequelize } from '../test/support';
import { flushdb, seed } from '../test/support';
beforeEach(flushdb);
it('should set JWT secret and password digest', async () => {
const user = User.build({
username: 'user',
name: 'User',
email: 'user1@example.com',
password: 'test123!',
});
const { user } = await seed();
await user.save();
expect(user.passwordDigest).toBeTruthy();

View File

@@ -45,10 +45,10 @@ const seed = async () => {
type: 'atlas',
});
let document = await Document.create({
const document = await Document.create({
parentDocumentId: null,
atlasId: collection.id,
teamId: collection.teamId,
teamId: team.id,
userId: collection.creatorId,
lastModifiedById: collection.creatorId,
createdById: collection.creatorId,