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() => {
|
it('should not delete the zone if it has tickets', async() => {
|
||||||
const tx = await models.Zone.beginTransaction({});
|
const tx = await models.Zone.beginTransaction({});
|
||||||
|
|
||||||
|
let error;
|
||||||
try {
|
try {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
await models.Zone.deleteZone(ctx, zoneId2, options);
|
await models.Zone.deleteZone(ctx, zoneId2, options);
|
||||||
|
|
||||||
expect(e.message).toEqual('There are tickets for this area, delete them first');
|
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
error = e.message;
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expect(error).toEqual('There are tickets for this area, delete them first');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue