()
| 228 | |
| 229 | #[test] |
| 230 | fn simple_equality_substitution() { |
| 231 | let pred = RlsPredicate::Compare { |
| 232 | field: "user_id".into(), |
| 233 | op: CompareOp::Eq, |
| 234 | value: PredicateValue::AuthRef("id".into()), |
| 235 | }; |
| 236 | let auth = make_auth(); |
| 237 | let filters = substitute_to_scan_filters(&pred, &auth).unwrap(); |
| 238 | assert_eq!(filters.len(), 1); |
| 239 | assert_eq!(filters[0].field, "user_id"); |
| 240 | assert_eq!(filters[0].op, crate::bridge::scan_filter::FilterOp::Eq); |
| 241 | assert_eq!(filters[0].value, nodedb_types::Value::String("123".into())); |
| 242 | } |
| 243 | |
| 244 | #[test] |
| 245 | fn literal_comparison() { |
nothing calls this directly
no test coverage detected