diff --git a/server/tests/models/models.test.js b/server/tests/models/models.test.js index 94be49f..947564b 100644 --- a/server/tests/models/models.test.js +++ b/server/tests/models/models.test.js @@ -393,11 +393,11 @@ describe('Models', () => { }); const detectionWithDevice = await models.DroneDetection.findByPk(detection.id, { - include: [models.Device] + include: [{ model: models.Device, as: 'device' }] }); - expect(detectionWithDevice.Device).to.exist; - expect(detectionWithDevice.Device.id).to.equal(device.id); + expect(detectionWithDevice.device).to.exist; + expect(detectionWithDevice.device.id).to.equal(device.id); }); });