| 259 | /// A shared root view round-trips through text with an identical fold. |
| 260 | #[test] |
| 261 | fn round_trip_shared_root() { |
| 262 | let m = ViewManifest::new("dev", ViewScope::Shared, None, vec![h(1), h(2)]); |
| 263 | m.verify().unwrap(); |
| 264 | |
| 265 | let parsed = ViewManifest::parse(&m.to_text()).unwrap(); |
| 266 | assert_eq!(parsed, m); |
| 267 | parsed.verify().unwrap(); |
| 268 | assert_eq!(parsed.parent, None); |
| 269 | assert!(parsed.scope.is_shared()); |
| 270 | } |
| 271 | |
| 272 | /// A draft with a parent keeps scope, parent, and full log (inherited |
| 273 | /// prefix included) through the round-trip. |