Updated test
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
649be482b5
commit
4479337731
|
@ -122,7 +122,7 @@ pipeline {
|
||||||
if (!['master', 'test'].contains(env.BRANCH_NAME)) {
|
if (!['master', 'test'].contains(env.BRANCH_NAME)) {
|
||||||
try {
|
try {
|
||||||
// junit 'junitresults.xml'
|
// junit 'junitresults.xml'
|
||||||
junit 'junit.xml'
|
// junit 'junit.xml'
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
echo e.toString()
|
echo e.toString()
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,11 @@ const {models} = require('vn-loopback/server/server');
|
||||||
|
|
||||||
fdescribe('account changePassword()', () => {
|
fdescribe('account changePassword()', () => {
|
||||||
it('should throw an error when old password is wrong', async() => {
|
it('should throw an error when old password is wrong', async() => {
|
||||||
const response = models.Account.changePassword(1, 'wrongPassword', 'nightmare.9999');
|
let err;
|
||||||
|
await models.Account.changePassword(1, 'wrongPassword', 'nightmare.9999')
|
||||||
|
.catch(error => err = error.sqlMessage);
|
||||||
|
|
||||||
const error = new Error('ER_SIGNAL_EXCEPTION: Invalid password');
|
expect(err).toBeDefined();
|
||||||
await expectAsync(response).toBeRejectedWith(error);
|
expect(err).toEqual('Invalid password');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue