This commit is contained in:
Mateusz Gruszczyński
2026-08-27 16:44:41 +02:00
parent ba61cb77b1
commit 65eaf50fb6
12 changed files with 64 additions and 49 deletions
+12 -3
View File
@@ -2301,11 +2301,20 @@ mod tests {
#[test]
fn local_thermostat_ownership_blocks_direct_automation() {
let mut zone = test_zone("device");
assert!(!device_blocked_by_local_thermostat(&zone.device_id, &[zone.clone()]));
assert!(!device_blocked_by_local_thermostat(
&zone.device_id,
std::slice::from_ref(&zone),
));
zone.local_thermostat_power = Some(true);
assert!(device_blocked_by_local_thermostat(&zone.device_id, &[zone.clone()]));
assert!(device_blocked_by_local_thermostat(
&zone.device_id,
std::slice::from_ref(&zone),
));
zone.local_thermostat_power = Some(false);
assert!(device_blocked_by_local_thermostat(&zone.device_id, &[zone]));
assert!(device_blocked_by_local_thermostat(
&zone.device_id,
std::slice::from_ref(&zone),
));
}
#[test]