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 () => {