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

Source from the content-addressed store, hash-verified

552
553 #[test]
554 fn test_remove_deny_rule() {
555 let mut raw = serde_json::Map::new();
556 raw.insert(
557 "permissions".to_string(),
558 serde_json::json!({
559 "deny": [METADATA_DENY_RULE, "other_rule"]
560 }),
561 );
562
563 remove_deny_rule(&mut raw);
564
565 let deny = raw["permissions"]["deny"].as_array().unwrap();
566 assert_eq!(deny.len(), 1);
567 assert_eq!(deny[0].as_str().unwrap(), "other_rule");
568 }
569
570 #[test]
571 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