MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_full_roundtrip

Function test_full_roundtrip

atomic-agent/src/hooks/claude_code/tests.rs:807–832  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

805
806 #[test]
807 fn test_full_roundtrip() {
808 let dir = tempfile::tempdir().unwrap();
809 let hook = make_hook();
810
811 // Not installed initially
812 assert!(!hook.is_installed(dir.path()));
813
814 // Install
815 let count = hook.install(dir.path()).unwrap();
816 assert_eq!(count, 8);
817 assert!(hook.is_installed(dir.path()));
818
819 // Idempotent install
820 let count2 = hook.install(dir.path()).unwrap();
821 assert_eq!(count2, 0);
822 assert!(hook.is_installed(dir.path()));
823
824 // Uninstall
825 hook.uninstall(dir.path()).unwrap();
826 assert!(!hook.is_installed(dir.path()));
827
828 // Reinstall
829 let count3 = hook.install(dir.path()).unwrap();
830 assert_eq!(count3, 8);
831 assert!(hook.is_installed(dir.path()));
832 }
833}

Callers

nothing calls this directly

Calls 5

make_hookFunction · 0.70
unwrapMethod · 0.45
installMethod · 0.45
pathMethod · 0.45
uninstallMethod · 0.45

Tested by

no test coverage detected