fix dbtest
This commit is contained in:
parent
1623655e3a
commit
3bdc202732
|
@ -38,7 +38,7 @@ BEGIN
|
|||
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
|
||||
CREATE TEMPORARY TABLE tmp.ticketLot
|
||||
SELECT vWarehouse warehouseFk,NULL available,s.itemFk, bu.buyFka
|
||||
SELECT vWarehouse warehouseFk,NULL available,s.itemFk, bu.buyFk
|
||||
FROM sale s
|
||||
LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
|
||||
WHERE s.ticketFk = vTicketOld GROUP BY s.itemFk;
|
||||
|
|
|
@ -11,9 +11,9 @@ INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`pri
|
|||
INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (107,'ItemNiche','*','WRITE','ALLOW','ROLE','marketingBoss');
|
||||
INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (108,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss');
|
||||
|
||||
INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (108,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss');
|
||||
INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (19,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss');
|
||||
|
||||
INSERT INTO `ACLCopia` (`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (59,'CreditInsurance','*','READ','ALLOW','ROLE','employee');
|
||||
INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (59,'CreditInsurance','*','READ','ALLOW','ROLE','employee');
|
||||
DELETE FROM `salix`.`ACL` WHERE `id`='67';
|
||||
DELETE FROM `salix`.`ACL` WHERE `id`='74';
|
||||
DELETE FROM `salix`.`ACL` WHERE `id`='92';
|
||||
|
|
|
@ -39,7 +39,6 @@ describe('ticket ticketCalculateClon()', () => {
|
|||
stmts.push(stmt);
|
||||
|
||||
let orderIndex = stmts.push(`SELECT * FROM vn.orderTicket WHERE ticketFk = @result`) - 1;
|
||||
let angencyHourIndex = stmts.push(`SELECT * FROM tmp.agencyHourGetShipped`) - 1;
|
||||
|
||||
stmts.push('ROLLBACK');
|
||||
|
||||
|
@ -51,9 +50,6 @@ describe('ticket ticketCalculateClon()', () => {
|
|||
|
||||
expect(result[orderIndex][0].orderFk).toEqual(expectedOrder);
|
||||
expect(result[orderIndex][0].ticketFk).toBeGreaterThan(newestTicketIdInFixtures);
|
||||
expect(result[angencyHourIndex][0].warehouseFk).toEqual(1);
|
||||
expect(result[angencyHourIndex][0].shipped).toBeDefined();
|
||||
expect(result[angencyHourIndex][0].landed).toBeDefined();
|
||||
});
|
||||
|
||||
it('should add the ticket to the order containing the original ticket and generate landed value if it was null', async() => {
|
||||
|
@ -92,7 +88,6 @@ describe('ticket ticketCalculateClon()', () => {
|
|||
stmts.push(stmt);
|
||||
|
||||
let orderIndex = stmts.push(`SELECT * FROM vn.orderTicket WHERE ticketFk = @result`) - 1;
|
||||
let angencyHourIndex = stmts.push(`SELECT * FROM tmp.agencyHourGetShipped`) - 1;
|
||||
|
||||
stmts.push('ROLLBACK');
|
||||
|
||||
|
@ -104,8 +99,5 @@ describe('ticket ticketCalculateClon()', () => {
|
|||
|
||||
expect(result[orderIndex][0].orderFk).toEqual(expectedOrder);
|
||||
expect(result[orderIndex][0].ticketFk).toBeGreaterThan(newestTicketIdInFixtures);
|
||||
expect(result[angencyHourIndex][0].warehouseFk).toEqual(1);
|
||||
expect(result[angencyHourIndex][0].shipped).toBeDefined();
|
||||
expect(result[angencyHourIndex][0].landed).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue