Accept device without log when no ban or whitelist set.

This commit is contained in:
Koen Kanters
2019-10-26 18:05:40 +02:00
parent 63ffe279ea
commit 7e9dfd4f41
2 changed files with 10 additions and 1 deletions
+7
View File
@@ -291,6 +291,13 @@ describe('Controller', () => {
expect(await handler(device.ieeeAddr)).toBe(true);
});
it('acceptJoiningDeviceHandler accept when no ban and whitelist', async () => {
await controller.start();
const device = zigbeeHerdsman.devices.bulb;
const handler = zigbeeHerdsman.constructor.mock.calls[0][0].acceptJoiningDeviceHandler;
expect(await handler(device.ieeeAddr)).toBe(true);
});
it('Shouldnt crash when two device join events are received', async () => {
await controller.start();
const device = zigbeeHerdsman.devices.bulb;