From 020990dadc10ddb4c8d7b6c8b12e848c7f411592 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 4 Aug 2022 09:53:22 +0200 Subject: [PATCH] fix: backTest --- db/dump/fixtures.sql | 6 +++++- db/dump/structure.sql | 2 +- .../back/methods/packaging/specs/listPackaging.spec.js | 4 ++-- .../back/methods/department/specs/removeChild.spec.js | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 1df09fc1b..07a797d54 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -2567,4 +2567,8 @@ INSERT INTO `vn`.`mdbBranch` (`name`) INSERT INTO `vn`.`mdbVersion` (`app`, `branchFk`, `version`) VALUES ('tpv', 'test', '1'), - ('lab', 'master', '1'); \ No newline at end of file + ('lab', 'master', '1'); + +INSERT INTO `vn`.`accountingConfig` (`id`, `minDate`, `maxDate`) + VALUES + (1, '2022-01-01', '2023-01-01'); diff --git a/db/dump/structure.sql b/db/dump/structure.sql index a5ec164ec..9c2d49bae 100644 --- a/db/dump/structure.sql +++ b/db/dump/structure.sql @@ -34197,7 +34197,7 @@ CREATE TABLE `report` ( -- Temporary table structure for view `returnBuckets` -- -DROP TABLE IF EXISTS `returnBuckets`; +DROP TABLE IF EXISTS `returnBuckets`; /*!50001 DROP VIEW IF EXISTS `returnBuckets`*/; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; diff --git a/modules/ticket/back/methods/packaging/specs/listPackaging.spec.js b/modules/ticket/back/methods/packaging/specs/listPackaging.spec.js index 3d07b90f9..1b5892e04 100644 --- a/modules/ticket/back/methods/packaging/specs/listPackaging.spec.js +++ b/modules/ticket/back/methods/packaging/specs/listPackaging.spec.js @@ -8,9 +8,9 @@ describe('ticket listPackaging()', () => { const options = {transaction: tx}; const filter = {where: {packagingFk: 1}}; - const response = await models.Packaging.listPackaging(filter, options); + const [response] = await models.Packaging.listPackaging(filter, options); - expect(response[0].name).toEqual('Container ammo box 1m'); + expect(response.name).toEqual('Container ammo box 1m'); await tx.rollback(); } catch (e) { diff --git a/modules/worker/back/methods/department/specs/removeChild.spec.js b/modules/worker/back/methods/department/specs/removeChild.spec.js index d83e1b819..b769bcaa6 100644 --- a/modules/worker/back/methods/department/specs/removeChild.spec.js +++ b/modules/worker/back/methods/department/specs/removeChild.spec.js @@ -8,7 +8,7 @@ describe('department removeChild()', () => { }); it('should remove a child department', async() => { - const childId = 1; + const childId = 44; removedChild = await app.models.Department.findById(childId); const result = await app.models.Department.removeChild(childId);