mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-28 20:17:18 -06:00
Keep selection test independent of the visible list's mutable borrow
This commit is contained in:
@@ -289,7 +289,8 @@ mod tests {
|
||||
let pid = "lc.golden-hour";
|
||||
session.execute("preset.apply", &json!({"id": pid})).unwrap();
|
||||
let state = AppliedPreset::new(&session, pid.into(), 100.0);
|
||||
let other = session.visible().iter().copied().find(|id| Some(*id) != session.active()).unwrap();
|
||||
let active = session.active();
|
||||
let other = session.visible().iter().copied().find(|id| Some(*id) != active).unwrap();
|
||||
session.execute("library.select", &json!({"ids": [other.0]})).unwrap();
|
||||
assert!(!state.is_current(&session), "the preset belongs to the earlier selection");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user