diff --git a/packages/core/admin/server/services/__tests__/auth.test.js b/packages/core/admin/server/services/__tests__/auth.test.js index 9aa446ae78..f66b0283ba 100644 --- a/packages/core/admin/server/services/__tests__/auth.test.js +++ b/packages/core/admin/server/services/__tests__/auth.test.js @@ -114,6 +114,17 @@ describe('Auth', () => { }); }); + describe('invalidatePassword', () => { + test('Compares password with hash', async () => { + const password = 'pcw123'; + const password2 = 'pcs1234'; + const hash = await hashPassword(password2); + + const isValid = await validatePassword(password, hash); + expect(isValid).toBe(false); + }); + }); + describe('forgotPassword', () => { test('Only run the process for active users', async () => { const findOne = jest.fn(() => Promise.resolve());