()
| 365 | |
| 366 | #[test] |
| 367 | fn installs_into_empty_target() { |
| 368 | let dir = tempfile::tempdir().unwrap(); |
| 369 | let target = dir.path().join("hooks.json"); |
| 370 | let manifest = dir.path().join("manifest.json"); |
| 371 | write( |
| 372 | &manifest, |
| 373 | &manifest_json(&target, "atomic agent hooks codex"), |
| 374 | ); |
| 375 | |
| 376 | let outcome = install_from_manifest(&manifest).unwrap(); |
| 377 | assert_eq!(outcome.added, 2); |
| 378 | assert_eq!(outcome.removed, 0); |
| 379 | |
| 380 | let written: Value = |
| 381 | serde_json::from_str(&std::fs::read_to_string(&target).unwrap()).unwrap(); |
| 382 | assert!(written["hooks"]["SessionStart"].is_array()); |
| 383 | assert!(written["hooks"]["Stop"].is_array()); |
| 384 | } |
| 385 | |
| 386 | #[test] |
| 387 | fn is_idempotent_and_syncs_changes() { |
nothing calls this directly
no test coverage detected