()
| 403 | |
| 404 | #[test] |
| 405 | fn installs_into_empty_target() { |
| 406 | let dir = tempfile::tempdir().unwrap(); |
| 407 | let target = dir.path().join("hooks.json"); |
| 408 | let manifest = dir.path().join("manifest.json"); |
| 409 | write( |
| 410 | &manifest, |
| 411 | &manifest_json(&target, "atomic agent hooks codex"), |
| 412 | ); |
| 413 | |
| 414 | let outcome = install_from_manifest(&manifest).unwrap(); |
| 415 | assert_eq!(outcome.added, 2); |
| 416 | assert_eq!(outcome.removed, 0); |
| 417 | |
| 418 | let written: Value = |
| 419 | serde_json::from_str(&std::fs::read_to_string(&target).unwrap()).unwrap(); |
| 420 | assert!(written["hooks"]["SessionStart"].is_array()); |
| 421 | assert!(written["hooks"]["Stop"].is_array()); |
| 422 | } |
| 423 | |
| 424 | #[test] |
| 425 | fn is_idempotent_and_syncs_changes() { |
nothing calls this directly
no test coverage detected