parent
a578c84dba
commit
8771098045
|
@ -839,7 +839,7 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
|
||||||
(13, 2, 67, 'concussion', 6),
|
(13, 2, 67, 'concussion', 6),
|
||||||
(14, 2, 23, '1', 7),
|
(14, 2, 23, '1', 7),
|
||||||
(15, 3, 56, 'Ranged weapon', 1),
|
(15, 3, 56, 'Ranged weapon', 1),
|
||||||
(16, 3, 58, 'sniper rifle', 2),
|
(16, 3, 58, 'sniper rifle', 2),
|
||||||
(17, 3, 4, '300mm', 3),
|
(17, 3, 4, '300mm', 3),
|
||||||
(18, 3, 36, 'Stark Industries', 4),
|
(18, 3, 36, 'Stark Industries', 4),
|
||||||
(19, 3, 1, 'Green', 5),
|
(19, 3, 1, 'Green', 5),
|
||||||
|
@ -908,14 +908,14 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
|
||||||
(82, 12, 1, 'Silver', 5),
|
(82, 12, 1, 'Silver', 5),
|
||||||
(83, 12, 67, 'rapid fire', 6),
|
(83, 12, 67, 'rapid fire', 6),
|
||||||
(84, 12, 23, '1', 7),
|
(84, 12, 23, '1', 7),
|
||||||
(85, 13, 56, 'Chest', 1),
|
(85, 13, 56, 'Chest', 1),
|
||||||
(86, 13, 58, 'ammo box', 2),
|
(86, 13, 58, 'ammo box', 2),
|
||||||
(87, 13, 27, '1m', 3),
|
(87, 13, 27, '1m', 3),
|
||||||
(88, 13, 36, 'Stark Industries', 4),
|
(88, 13, 36, 'Stark Industries', 4),
|
||||||
(89, 13, 1, 'Green', 5),
|
(89, 13, 1, 'Green', 5),
|
||||||
(90, 13, 67, 'supply', 6),
|
(90, 13, 67, 'supply', 6),
|
||||||
(91, 13, 23, '1', 7),
|
(91, 13, 23, '1', 7),
|
||||||
(92, 14, 56, 'Chest', 1),
|
(92, 14, 56, 'Chest', 1),
|
||||||
(93, 14, 58, 'medical box', 2),
|
(93, 14, 58, 'medical box', 2),
|
||||||
(94, 14, 27, '1m', 3),
|
(94, 14, 27, '1m', 3),
|
||||||
(95, 14, 36, 'Stark Industries', 4),
|
(95, 14, 36, 'Stark Industries', 4),
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe('item filter()', () => {
|
||||||
expect(result[0].id).toEqual(2);
|
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 = {
|
let filter = {
|
||||||
order: 'isActive ASC, name',
|
order: 'isActive ASC, name',
|
||||||
limit: 8
|
limit: 8
|
||||||
|
@ -26,8 +26,5 @@ describe('item filter()', () => {
|
||||||
let result = await app.models.Item.filter({args: {filter: filter, typeFk: 5, tags: tags}});
|
let result = await app.models.Item.filter({args: {filter: filter, typeFk: 5, tags: tags}});
|
||||||
|
|
||||||
expect(result.length).toEqual(2);
|
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');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue