salix/back/methods/account/specs/change-password.spec.js

10 lines
317 B
JavaScript

const app = require('vn-loopback/server/server');
describe('account changePassword()', () => {
it('should throw an error when old password is wrong', async() => {
let req = app.models.Account.changePassword(null, 1, 'wrongOldPass', 'newPass');
await expectAsync(req).toBeRejected();
});
});