Disable legacy options on new network start.

This commit is contained in:
Koen Kanters committed 2021-06-07 09:46:10 +02:00
1 parent 95d39a3ff6
commit 0401a13d5d
2 files changed
+16 -2

No files matched your search

+7
View File
@@ -623,4 +623,11 @@ describe('Controller', () => {
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/fo', 'bar', { retain: false, qos: 0 }, expect.any(Function));
});
it('Should disable legacy options on new network start', async () => {
expect(settings.get().advanced.legacy_api).toBeTruthy();
zigbeeHerdsman.start.mockReturnValueOnce('reset');
await controller.start();
expect(settings.get().advanced.legacy_api).toBeFalsy();
});
});