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

Function test_full_roundtrip

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

Source from the content-addressed store, hash-verified

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

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