From 877109804528bc579c0ba696daa56a24f70dcf5a Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Fri, 3 May 2019 18:23:44 +0200 Subject: [PATCH] #1350 route.index --- db/dump/fixtures.sql | 6 +++--- modules/item/back/methods/item/specs/filter.spec.js | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index faf552caf..bac6b0664 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -839,7 +839,7 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`) (13, 2, 67, 'concussion', 6), (14, 2, 23, '1', 7), (15, 3, 56, 'Ranged weapon', 1), - (16, 3, 58, 'sniper rifle', 2), + (16, 3, 58, 'sniper rifle', 2), (17, 3, 4, '300mm', 3), (18, 3, 36, 'Stark Industries', 4), (19, 3, 1, 'Green', 5), @@ -908,14 +908,14 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`) (82, 12, 1, 'Silver', 5), (83, 12, 67, 'rapid fire', 6), (84, 12, 23, '1', 7), - (85, 13, 56, 'Chest', 1), + (85, 13, 56, 'Chest', 1), (86, 13, 58, 'ammo box', 2), (87, 13, 27, '1m', 3), (88, 13, 36, 'Stark Industries', 4), (89, 13, 1, 'Green', 5), (90, 13, 67, 'supply', 6), (91, 13, 23, '1', 7), - (92, 14, 56, 'Chest', 1), + (92, 14, 56, 'Chest', 1), (93, 14, 58, 'medical box', 2), (94, 14, 27, '1m', 3), (95, 14, 36, 'Stark Industries', 4), diff --git a/modules/item/back/methods/item/specs/filter.spec.js b/modules/item/back/methods/item/specs/filter.spec.js index 22cb5913e..72175ccc4 100644 --- a/modules/item/back/methods/item/specs/filter.spec.js +++ b/modules/item/back/methods/item/specs/filter.spec.js @@ -17,7 +17,7 @@ describe('item filter()', () => { expect(result[0].id).toEqual(2); }); - it('should return 1 result using filter and tags', async() => { + it('should return 2 results using filter and tags', async() => { let filter = { order: 'isActive ASC, name', limit: 8 @@ -26,8 +26,5 @@ describe('item filter()', () => { let result = await app.models.Item.filter({args: {filter: filter, typeFk: 5, tags: tags}}); expect(result.length).toEqual(2); - expect(result[0].id).toEqual(14); - expect(result[0].name).toEqual('Chest medical box 1m'); - expect(result[1].name).toEqual('Container medical box 1m'); }); });