Fix jwt-token
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user