test: refs #7322 added test error for case when expected error is not thrown
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
4fd58e24c5
commit
29af7cfcbc
|
@ -92,6 +92,7 @@ describe('Ticket transferClient()', () => {
|
|||
const addressFk = 1;
|
||||
try {
|
||||
await models.Ticket.transferClient(ctx, originalTicketId, clientId, addressFk, options);
|
||||
fail('Expected an error to be thrown, but none was thrown.');
|
||||
} catch (e) {
|
||||
expect(e.message).toEqual('The address does not belong to the client');
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
const UserError = require('vn-loopback/util/user-error');
|
||||
module.exports = Self => {
|
||||
Self.remoteMethodCtx('transferClient', {
|
||||
description: 'Transferring ticket to another client',
|
||||
|
|
Loading…
Reference in New Issue