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

Function test_uninstall_removes_section

atomic-cli/src/commands/git/hooks.rs:285–292  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

283
284 #[test]
285 fn test_uninstall_removes_section() {
286 let dir = TempDir::new().unwrap();
287 let path = dir.path().join("post-commit");
288 install_single_hook(&path, "post-commit").unwrap();
289 assert!(remove_atomic_section(&path).unwrap());
290 // File should be deleted (only had shebang + atomic section)
291 assert!(!path.exists());
292 }
293
294 #[test]
295 fn test_uninstall_preserves_other_content() {

Callers

nothing calls this directly

Calls 3

install_single_hookFunction · 0.85
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected