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

Function test_remove_deny_rule

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

Source from the content-addressed store, hash-verified

548
549 #[test]
550 fn test_remove_deny_rule() {
551 let mut raw = serde_json::Map::new();
552 raw.insert(
553 "permissions".to_string(),
554 serde_json::json!({
555 "deny": [METADATA_DENY_RULE, "other_rule"]
556 }),
557 );
558
559 remove_deny_rule(&mut raw);
560
561 let deny = raw["permissions"]["deny"].as_array().unwrap();
562 assert_eq!(deny.len(), 1);
563 assert_eq!(deny[0].as_str().unwrap(), "other_rule");
564 }
565
566 #[test]
567 fn test_remove_deny_rule_cleans_up_empty_deny() {

Callers

nothing calls this directly

Calls 3

remove_deny_ruleFunction · 0.85
insertMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected