fix: refs #7906 fix test back
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Carlos Satorres 2024-10-18 09:27:43 +02:00
parent 02dc952024
commit 1273e895af
1 changed files with 4 additions and 3 deletions

View File

@ -48,15 +48,16 @@ describe('zone deletezone()', () => {
it('should not delete the zone if it has tickets', async() => {
const tx = await models.Zone.beginTransaction({});
let error;
try {
const options = {transaction: tx};
await models.Zone.deleteZone(ctx, zoneId2, options);
expect(e.message).toEqual('There are tickets for this area, delete them first');
await tx.rollback();
} catch (e) {
error = e.message;
await tx.rollback();
}
expect(error).toEqual('There are tickets for this area, delete them first');
});
});