ref #6246 check sales and update test #1763

Merged
jorgep merged 3 commits from 6246-checkTicketSales into dev 2023-09-26 06:25:24 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 6fe52ba3e8 - Show all commits

View File

@ -118,7 +118,7 @@ module.exports = Self => {
// Send notification to salesPerson
const salesPersonUser = ticket.client().salesPersonUser();
if (salesPersonUser) {
if (salesPersonUser && sales.length) {
const origin = ctx.req.headers.origin;
const message = $t(`I have deleted the ticket id`, {
id: id,

View File

@ -34,7 +34,7 @@ describe('ticket merge()', () => {
return value;
};
it('should merge two tickets', async() => {
it('should merge a ticket', async() => {
jorgep marked this conversation as resolved Outdated

pasa por chatGpt porque no termina de estar claro

pasa por chatGpt porque no termina de estar claro
const tx = await models.Ticket.beginTransaction({});
try {
@ -49,7 +49,7 @@ describe('ticket merge()', () => {
expect(deletedTicket.isDeleted).toEqual(true);
expect(salesTicketFuture.length).toEqual(2);
expect(chatNotificationBeforeMerge.length).toEqual(chatNotificationAfterMerge.length - 2);
expect(chatNotificationBeforeMerge.length).toEqual(chatNotificationAfterMerge.length - 1);
await tx.rollback();
} catch (e) {