MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / literal_comparison

Function literal_comparison

nodedb/src/control/security/predicate.rs:245–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

243
244 #[test]
245 fn literal_comparison() {
246 let pred = RlsPredicate::Compare {
247 field: "status".into(),
248 op: CompareOp::Eq,
249 value: PredicateValue::Literal(serde_json::json!("active")),
250 };
251 let auth = make_auth();
252 let filters = substitute_to_scan_filters(&pred, &auth).unwrap();
253 assert_eq!(
254 filters[0].value,
255 nodedb_types::Value::String("active".into())
256 );
257 }
258
259 #[test]
260 fn auth_contains_check() {

Callers

nothing calls this directly

Calls 2

make_authFunction · 0.70

Tested by

no test coverage detected