test: refs #7322 added test error for case when expected error is not thrown
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jose Antonio Tubau 2025-01-27 08:23:30 +01:00
parent 4fd58e24c5
commit 29af7cfcbc
2 changed files with 2 additions and 0 deletions

View File

@ -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');
}

View File

@ -1,3 +1,4 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('transferClient', {
description: 'Transferring ticket to another client',