From 334016331598c7a60b79bf21e28aabf3b460d663 Mon Sep 17 00:00:00 2001 From: Bernat Date: Mon, 25 Mar 2019 10:00:49 +0100 Subject: [PATCH] refactor worker fixtures --- db/install/dump/fixtures.sql | 10 +++++----- .../methods/client/specs/activeWorkersWithRole.spec.js | 2 +- .../back/methods/client/specs/listWorkers.spec.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/db/install/dump/fixtures.sql b/db/install/dump/fixtures.sql index 99a073e63..dd618c431 100644 --- a/db/install/dump/fixtures.sql +++ b/db/install/dump/fixtures.sql @@ -27,10 +27,10 @@ INSERT INTO `account`.`user`(`id`,`name`,`password`,`role`,`active`,`email`,`lan (103, 'ClarkKent', 'ac754a330530832ba1bf7687f577da91', 2 , 1, 'ClarkKent@mydomain.com', 'es'), (104, 'TonyStark', 'ac754a330530832ba1bf7687f577da91', 2 , 1, 'TonyStark@mydomain.com', 'es'), (105, 'MaxEisenhardt', 'ac754a330530832ba1bf7687f577da91', 2 , 1, 'MaxEisenhardt@mydomain.com', 'es'), - (106, 'DavidCharlesHaller', 'ac754a330530832ba1bf7687f577da91', 2 , 1, 'DavidCharlesHaller@mydomain.com', 'es'), - (107, 'HankPym', 'ac754a330530832ba1bf7687f577da91', 2 , 1, 'HankPym@mydomain.com', 'es'), - (108, 'CharlesXavier', 'ac754a330530832ba1bf7687f577da91', 20, 1, 'CharlesXavier@mydomain.com', 'es'), - (109, 'BruceBanner', 'ac754a330530832ba1bf7687f577da91', 2 , 1, 'BruceBanner@mydomain.com', 'es'), + (106, 'DavidCharlesHaller', 'ac754a330530832ba1bf7687f577da91', 1 , 1, 'DavidCharlesHaller@mydomain.com', 'es'), + (107, 'HankPym', 'ac754a330530832ba1bf7687f577da91', 1 , 1, 'HankPym@mydomain.com', 'es'), + (108, 'CharlesXavier', 'ac754a330530832ba1bf7687f577da91', 1, 1, 'CharlesXavier@mydomain.com', 'es'), + (109, 'BruceBanner', 'ac754a330530832ba1bf7687f577da91', 1 , 1, 'BruceBanner@mydomain.com', 'es'), (110, 'JessicaJones', 'ac754a330530832ba1bf7687f577da91', 1 , 1, 'JessicaJones@mydomain.com', 'es'), (111, 'Missing', 'ac754a330530832ba1bf7687f577da91', 2 , 0, NULL, 'es'), (112, 'Trash', 'ac754a330530832ba1bf7687f577da91', 2 , 0, NULL, 'es'); @@ -1248,4 +1248,4 @@ INSERT INTO `postgresql`.`calendar_employee` (`business_id`, `calendar_state_id` ('2', '1', DATE_ADD(CURDATE(), INTERVAL 30 DAY)), ('2', '2', DATE_ADD(CURDATE(), INTERVAL -10 DAY)), ('2', '1', DATE_ADD(CURDATE(), INTERVAL -12 DAY)), - ('2', '2', DATE_ADD(CURDATE(), INTERVAL -20 DAY)); \ No newline at end of file + ('2', '2', DATE_ADD(CURDATE(), INTERVAL -20 DAY)); diff --git a/modules/client/back/methods/client/specs/activeWorkersWithRole.spec.js b/modules/client/back/methods/client/specs/activeWorkersWithRole.spec.js index 505026df0..578073c0e 100644 --- a/modules/client/back/methods/client/specs/activeWorkersWithRole.spec.js +++ b/modules/client/back/methods/client/specs/activeWorkersWithRole.spec.js @@ -17,7 +17,7 @@ describe('Client activeWorkersWithRole', () => { let isBuyer = await app.models.Account.hasRole(result[0].id, 'buyer'); - expect(result.length).toEqual(10); + expect(result.length).toEqual(9); expect(isBuyer).toBeTruthy(); }); }); diff --git a/modules/client/back/methods/client/specs/listWorkers.spec.js b/modules/client/back/methods/client/specs/listWorkers.spec.js index 4b85e1c51..068468b63 100644 --- a/modules/client/back/methods/client/specs/listWorkers.spec.js +++ b/modules/client/back/methods/client/specs/listWorkers.spec.js @@ -6,7 +6,7 @@ describe('Client listWorkers', () => { .then(result => { let amountOfEmployees = Object.keys(result).length; - expect(amountOfEmployees).toEqual(44); + expect(amountOfEmployees).toEqual(47); done(); }) .catch(done.fail);