update fixtures and fix test

This commit is contained in:
Bernat 2018-10-01 14:57:51 +02:00
parent 0ed2f9518b
commit 82fba82f2d
2 changed files with 8 additions and 10 deletions

View File

@ -850,16 +850,16 @@ INSERT INTO `vn`.`clientSample`(`id`, `clientFk`, `typeFk`, `created`, `workerFk
INSERT INTO `vn`.`claim`(`id`, `ticketCreated`, `claimStateFk`, `observation`, `clientFk`, `workerFk`, `responsibility`, `isChargedToMana`, `created` ) INSERT INTO `vn`.`claim`(`id`, `ticketCreated`, `claimStateFk`, `observation`, `clientFk`, `workerFk`, `responsibility`, `isChargedToMana`, `created` )
VALUES VALUES
( 1, CURDATE(), 1, 'observation one' , 101, 18, 1, 0, CURDATE()), ( 1, CURDATE(), 1, 'observation one' , 101, 18, 1, 0, CURDATE()),
( 2, CURDATE(), 2, 'observation two' , 101, 18, 2, 0, CURDATE()), ( 2, CURDATE(), 2, 'observation two' , 101, 18, 2, 0, CURDATE()),
( 3, CURDATE(), 3, 'observation three' , 101, 18, 3, 0, CURDATE()); ( 3, DATE_ADD(CURDATE(), INTERVAL -5 DAY), 3, 'observation three' , 101, 18, 3, 0, CURDATE());
INSERT INTO `vn`.`claimBeginning`(`id`, `claimFk`, `saleFk`, `quantity`) INSERT INTO `vn`.`claimBeginning`(`id`, `claimFk`, `saleFk`, `quantity`)
VALUES VALUES
( 1, 1, 1, 5), ( 1, 1, 7, 5),
( 2, 1, 2, 4), ( 2, 1, 8, 4),
( 3, 2, 5, 10), ( 3, 2, 10, 10),
( 4, 3, 6, 5); ( 4, 3, 6, 5);
INSERT INTO `vn`.`claimDevelopment`(`id`, `claimFk`, `claimResponsibleFk`, `workerFk`, `claimReasonFk`, `claimResultFk`, `claimRedeliveryFk`, `claimDestinationFk`) INSERT INTO `vn`.`claimDevelopment`(`id`, `claimFk`, `claimResponsibleFk`, `workerFk`, `claimReasonFk`, `claimResultFk`, `claimRedeliveryFk`, `claimDestinationFk`)
VALUES VALUES
@ -873,8 +873,6 @@ INSERT INTO `hedera`.`tpvMerchant`(`id`, `description`, `companyFk`, `bankFk`, `
( 1, 'Arkham Bank', 442, 1, 'h12387193H10238'), ( 1, 'Arkham Bank', 442, 1, 'h12387193H10238'),
( 2, 'NewYork Bank', 442, 1, '7981ugsgd1hsdad'); ( 2, 'NewYork Bank', 442, 1, '7981ugsgd1hsdad');
INSERT INTO `hedera`.`tpvTransaction`(`id`,`merchantFk`, `clientFk`,`receiptFk`, `amount`, `response`, `errorCode`, `status`, `created`) INSERT INTO `hedera`.`tpvTransaction`(`id`,`merchantFk`, `clientFk`,`receiptFk`, `amount`, `response`, `errorCode`, `status`, `created`)
VALUES VALUES
(1, 1, 101, NULL, 2000, NULL, 'SIS0042', 'ok', CURDATE()), (1, 1, 101, NULL, 2000, NULL, 'SIS0042', 'ok', CURDATE()),

View File

@ -5,6 +5,6 @@ describe('sale getClaimableFromTicket()', () => {
let claimableFromTicket = await app.models.Sale.getClaimableFromTicket(16); let claimableFromTicket = await app.models.Sale.getClaimableFromTicket(16);
expect(claimableFromTicket[0].concept).toBe('Gem of Time'); expect(claimableFromTicket[0].concept).toBe('Gem of Time');
expect(claimableFromTicket.length).toBe(4); expect(claimableFromTicket.length).toBe(3);
}); });
}); });