This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/server/models/User.test.js
Tom Moor 66e4995885
💚 ?
2017-07-15 16:08:12 -07:00

13 lines
381 B
JavaScript

import { flushdb, seed } from '../test/support';
beforeEach(flushdb);
it('should set JWT secret and password digest', async () => {
const { user } = await seed();
expect(user.passwordDigest).toBeTruthy();
expect(user.getJwtToken()).toBeTruthy();
expect(await user.verifyPassword('test123!')).toBe(true);
expect(await user.verifyPassword('badPasswd')).toBe(false);
});