From f7e269e72e25589ac1be1733c45bb336cf01756f Mon Sep 17 00:00:00 2001 From: Bernat Date: Wed, 7 Nov 2018 08:38:06 +0100 Subject: [PATCH] fix test --- .../methods/item/specs/getLastEntries.spec.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/services/loopback/common/methods/item/specs/getLastEntries.spec.js b/services/loopback/common/methods/item/specs/getLastEntries.spec.js index 7819fb600..1f54456ad 100644 --- a/services/loopback/common/methods/item/specs/getLastEntries.spec.js +++ b/services/loopback/common/methods/item/specs/getLastEntries.spec.js @@ -1,7 +1,7 @@ const app = require(`${servicesDir}/item/server/server`); describe('item getLastEntries()', () => { - it('should return one entry for a given item', async() => { + it('should return one entry for a given item', async () => { let date = new Date(); let filter = {where: {itemFk: 1, date: date}}; let result = await app.models.Item.getLastEntries(filter); @@ -9,16 +9,7 @@ describe('item getLastEntries()', () => { expect(result.length).toEqual(1); }); - it('should return two entries for a given item', async() => { - let date = new Date(); - date.setMonth(date.getMonth() - 1); - let filter = {where: {itemFk: 1, date: date}}; - let result = await app.models.Item.getLastEntries(filter); - - expect(result.length).toEqual(2); - }); - - it('should return three entries for a given item', async() => { + it('should return three entries for a given item', async () => { let date = new Date(); date.setMonth(date.getMonth() - 2); let filter = {where: {itemFk: 1, date: date}};