From 61ff68b7ab55d6f8c4fb1b312c02c42a4c760f70 Mon Sep 17 00:00:00 2001 From: Thomas LEMAISTRE <35010958+Terdious@users.noreply.github.com> Date: Thu, 3 Nov 2022 07:28:22 +0100 Subject: [PATCH] Add job in test --- .../test/lib/device/device.getDeviceFeaturesStates.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/test/lib/device/device.getDeviceFeaturesStates.test.js b/server/test/lib/device/device.getDeviceFeaturesStates.test.js index 151adbf5ce..dc4c47f8b2 100644 --- a/server/test/lib/device/device.getDeviceFeaturesStates.test.js +++ b/server/test/lib/device/device.getDeviceFeaturesStates.test.js @@ -45,7 +45,7 @@ describe('Device.getDeviceFeaturesStates', function Describe() { }), }; const dateState = '2000-06-15'; - const device = new Device(event, {}, stateManager, {}, {}, variable); + const device = new Device(event, {}, stateManager, {}, {}, variable, job); const states = await device.getDeviceFeaturesStates('test-device-feature', { from: new Date(`${dateState}T00:00:00.000Z`).toISOString(), attributes: 'created_at,value', @@ -65,7 +65,7 @@ describe('Device.getDeviceFeaturesStates', function Describe() { get: fake.returns(null), }; const dateState = '2000-06-15'; - const device = new Device(event, {}, stateManager, {}, {}, variable); + const device = new Device(event, {}, stateManager, {}, {}, variable, job); const promise = device.getDeviceFeaturesStates('test-device-feature', { from: new Date(`${dateState}T00:00:00.000Z`).toISOString(), to: new Date(`${dateState}T10:00:00.000Z`).toISOString(), @@ -82,7 +82,7 @@ describe('Device.getDeviceFeaturesStates', function Describe() { name: 'my-feature', }), }; - const device = new Device(event, {}, stateManager, {}, {}, variable); + const device = new Device(event, {}, stateManager, {}, {}, variable, job); const promise = device.getDeviceFeaturesStates('this-device-does-not-exist', {}); return assert.isRejected(promise, 'Start date missing'); });