8179-testToMaster #3176
|
@ -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