Assert this query returns the expected rows for this user
(
db: Arc<RelationalDB>,
sql: &str,
auth: AuthCtx,
expected: impl IntoIterator<Item = ProductValue>,
)
| 489 | |
| 490 | /// Assert this query returns the expected rows for this user |
| 491 | async fn assert_query_results( |
| 492 | db: Arc<RelationalDB>, |
| 493 | sql: &str, |
| 494 | auth: AuthCtx, |
| 495 | expected: impl IntoIterator<Item = ProductValue>, |
| 496 | ) { |
| 497 | assert_eq!( |
| 498 | run(db, sql.to_string(), auth.clone(), None, None, &mut vec![]) |
| 499 | .await |
| 500 | .unwrap() |
| 501 | .rows |
| 502 | .into_iter() |
| 503 | .sorted() |
| 504 | .dedup() |
| 505 | .collect::<Vec<_>>(), |
| 506 | expected.into_iter().sorted().dedup().collect::<Vec<_>>() |
| 507 | ); |
| 508 | } |
| 509 | |
| 510 | /// Test a query that uses a multi-column index |
| 511 | #[tokio::test] |
no outgoing calls
searching dependent graphs…