test(viewer): the book a viewer finds is compared as the system spells it (macOS: /private/tmp)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
This commit is contained in:
swaitsandClaude Fable 5.1 committed 2026-10-29 20:43:42 -06:00
1 parent 888742166b
commit 584ec9390d
1 file changed
+6 -1
+6 -1
View File
@@ -386,7 +386,12 @@ fn the_viewer_finds_its_book_in_the_root() {
) )
.unwrap(); .unwrap();
} }
let dir = |id: &str| root.book_dir(&ledger_store::root::BookId::parse(id).unwrap()); // As the system spells it: `book_in_root` answers a canonical path
// (macOS writes /tmp as /private/tmp).
let dir = |id: &str| {
std::fs::canonicalize(root.book_dir(&ledger_store::root::BookId::parse(id).unwrap()))
.unwrap()
};
assert_eq!( assert_eq!(
ledger_gui::book_in_root(Some(&r), Some("zeta")).unwrap(), ledger_gui::book_in_root(Some(&r), Some("zeta")).unwrap(),
dir("zeta") dir("zeta")