💚 ?
This commit is contained in:
@@ -130,6 +130,11 @@ Document.associate = models => {
|
||||
},
|
||||
{ override: true }
|
||||
);
|
||||
Document.addScope('withStarred', userId => ({
|
||||
include: [
|
||||
{ model: models.Star, as: 'starred', where: { userId }, required: false },
|
||||
],
|
||||
}));
|
||||
};
|
||||
|
||||
Document.findById = async id => {
|
||||
|
||||
@@ -4,8 +4,6 @@ beforeEach(flushdb);
|
||||
|
||||
it('should set JWT secret and password digest', async () => {
|
||||
const { user } = await seed();
|
||||
await user.save();
|
||||
|
||||
expect(user.passwordDigest).toBeTruthy();
|
||||
expect(user.getJwtToken()).toBeTruthy();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user