()
| 371 | |
| 372 | #[test] |
| 373 | fn parse_simple_equality() { |
| 374 | let pred = parse_predicate("user_id = $auth.id").unwrap(); |
| 375 | match pred { |
| 376 | RlsPredicate::Compare { field, op, value } => { |
| 377 | assert_eq!(field, "user_id"); |
| 378 | assert_eq!(op, CompareOp::Eq); |
| 379 | assert!(matches!(value, PredicateValue::AuthRef(ref f) if f == "id")); |
| 380 | } |
| 381 | _ => panic!("expected Compare"), |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | #[test] |
| 386 | fn parse_and_or() { |
nothing calls this directly
no test coverage detected