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

Function test_remove_atomic_hooks

atomic-agent/src/hooks/gemini_cli.rs:1219–1246  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1217
1218 #[test]
1219 fn test_remove_atomic_hooks() {
1220 let mut matchers = vec![GeminiHookMatcher {
1221 matcher: "".to_string(),
1222 hooks: vec![
1223 GeminiHookEntry {
1224 hook_type: "command".to_string(),
1225 command: "my-custom-hook".to_string(),
1226 name: None,
1227 timeout: None,
1228 description: None,
1229 },
1230 GeminiHookEntry {
1231 hook_type: "command".to_string(),
1232 command: "atomic agent hooks gemini-cli after-agent".to_string(),
1233 name: Some("atomic-turn-end".to_string()),
1234 timeout: None,
1235 description: None,
1236 },
1237 ],
1238 sequential: None,
1239 }];
1240
1241 remove_atomic_hooks(&mut matchers);
1242
1243 assert_eq!(matchers.len(), 1);
1244 assert_eq!(matchers[0].hooks.len(), 1);
1245 assert_eq!(matchers[0].hooks[0].command, "my-custom-hook");
1246 }
1247
1248 #[test]
1249 fn test_remove_atomic_hooks_removes_empty_matchers() {

Callers

nothing calls this directly

Calls 1

remove_atomic_hooksFunction · 0.70

Tested by

no test coverage detected