From 5e2ebbc8d995afb4f1d6f634d8907047abaf7f95 Mon Sep 17 00:00:00 2001 From: Anders Olsson Date: Tue, 2 Jun 2026 13:14:37 +0200 Subject: [PATCH] test(domain): assert IllegalTransition Display message --- crates/domain/src/object.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/domain/src/object.rs b/crates/domain/src/object.rs index 41b1829..474f787 100644 --- a/crates/domain/src/object.rs +++ b/crates/domain/src/object.rs @@ -180,6 +180,11 @@ mod tests { to: Draft }) ); + // the Display message is the user-visible surface of the error + assert_eq!( + Draft.transition_to(Public).unwrap_err().to_string(), + "illegal visibility transition: draft -> public" + ); } #[test]