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