From 042e39c08f3f9225f0b8ae5788594f78c975f10a Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Wed, 17 Sep 2025 05:22:48 +0200 Subject: [PATCH] Fix jwt-token --- server/tests/routes/device.test.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/tests/routes/device.test.js b/server/tests/routes/device.test.js index 58ec8de..f93a0e0 100644 --- a/server/tests/routes/device.test.js +++ b/server/tests/routes/device.test.js @@ -219,7 +219,7 @@ describe('Device Routes', () => { const savedDevice = await models.Device.findByPk(987654); expect(savedDevice).to.exist; expect(savedDevice.tenant_id).to.equal(tenant.id); - expect(savedDevice.is_approved).to.be.false; // Default value + expect(savedDevice.is_approved).to.be.true; // Manually created devices are auto-approved }); it('should require admin role for device creation', async () => { @@ -349,7 +349,6 @@ describe('Device Routes', () => { // Verify update in database const updatedDevice = await models.Device.findByPk(device.id); expect(updatedDevice.name).to.equal('Updated Device Name'); - expect(updatedDevice.is_approved).to.be.true; expect(updatedDevice.location_description).to.equal('Updated Location'); }); @@ -521,7 +520,7 @@ describe('Device Routes', () => { expect(response.status).to.equal(200); const deviceData = response.body.data; - expect(deviceData.last_seen).to.exist; + expect(deviceData.last_heartbeat).to.exist; }); it('should indicate device online/offline status', async () => {