resolve intake: the late composition test reads the composition's text, since the body takes the Use's id

This commit is contained in:
Meta Vens 2026-11-28 04:19:54 +01:00
commit 28f75112f6

View file

@ -197,17 +197,16 @@ fn a_composition_published_late_replaces_the_placeholder_without_a_republish() {
let document = surface("main", 1, vec![use_of("ghost-use", "ghost")]);
let key = document.record_key();
assert_eq!(codes(&rig.offer(&document)), vec![Code::UnresolvedUse]);
assert!(!rig.shows(&key, "ghost-body"));
assert!(!rig.shows(&key, "\"boo\""));
rig.put(&composition("ghost", "boo"));
assert!(rig.settle().is_empty());
eprintln!("DBG {:?} calls {:?}", rig.resolver.tree(&key).map(|t| format!("{:?}", t.document().root)), rig.state.calls());
assert!(rig.shows(&key, "ghost-body"));
assert!(rig.shows(&key, "\"boo\""));
// It goes away: the placeholder returns, and the interest stays.
rig.state.delete(&comp_address("ghost"));
assert_eq!(codes(&rig.settle()), vec![Code::UnresolvedUse]);
assert!(!rig.shows(&key, "ghost-body"));
assert!(!rig.shows(&key, "\"boo\""));
// It comes back refused: a refusal is not absence.
rig.state.put_raw(comp_address("ghost"), vec![0xc1]);