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:306–313  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

304
305 #[test]
306 fn test_uninstall_removes_section() {
307 let dir = TempDir::new().unwrap();
308 let path = dir.path().join("post-commit");
309 install_single_hook(&path, "post-commit").unwrap();
310 assert!(remove_atomic_section(&path).unwrap());
311 // File should be deleted (only had shebang + atomic section)
312 assert!(!path.exists());
313 }
314
315 #[test]
316 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