fix: refs #7906 fix test back
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
02dc952024
commit
1273e895af
|
@ -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');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue