Fix jwt-token

This commit is contained in:
2025-09-15 15:23:21 +02:00
parent d4dba54e71
commit d9d6f9502f

View File

@@ -455,11 +455,11 @@ describe('Models', () => {
}); });
const ruleWithTenant = await models.AlertRule.findByPk(rule.id, { const ruleWithTenant = await models.AlertRule.findByPk(rule.id, {
include: [models.Tenant] include: [{ model: models.Tenant, as: 'tenant' }]
}); });
expect(ruleWithTenant.Tenant).to.exist; expect(ruleWithTenant.tenant).to.exist;
expect(ruleWithTenant.Tenant.id).to.equal(tenant.id); expect(ruleWithTenant.tenant.id).to.equal(tenant.id);
}); });
}); });
@@ -546,11 +546,11 @@ describe('Models', () => {
}); });
const logWithDevice = await models.AlertLog.findByPk(alertLog.id, { const logWithDevice = await models.AlertLog.findByPk(alertLog.id, {
include: [models.Device] include: [{ model: models.Device, as: 'device' }]
}); });
expect(logWithDevice.Device).to.exist; expect(logWithDevice.device).to.exist;
expect(logWithDevice.Device.id).to.equal(device.id); expect(logWithDevice.device.id).to.equal(device.id);
}); });
}); });