8144-devToTest_2444 #3137
|
@ -8,7 +8,7 @@ describe('zone deletezone()', () => {
|
|||
__: value => value
|
||||
};
|
||||
const ctx = {req: activeCtx};
|
||||
const zoneId = 9;
|
||||
const zoneId = 4;
|
||||
let ticketIDs;
|
||||
let originalTicketStates;
|
||||
|
||||
|
@ -35,18 +35,8 @@ describe('zone deletezone()', () => {
|
|||
await models.Zone.deleteZone(ctx, zoneId, options);
|
||||
|
||||
const updatedZone = await models.Zone.findById(zoneId, null, options);
|
||||
const anUpdatedTicket = await models.Ticket.findById(ticketIDs[0], null, options);
|
||||
|
||||
const updatedTicketStates = await models.TicketState.find({
|
||||
where: {
|
||||
ticketFk: {inq: ticketIDs},
|
||||
code: 'FIXING'
|
||||
}
|
||||
}, options);
|
||||
|
||||
expect(updatedZone).toBeNull();
|
||||
expect(anUpdatedTicket.zoneFk).toBeNull();
|
||||
expect(updatedTicketStates.length).toBeGreaterThan(originalTicketStates.length);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in New Issue