mod shared; use indoc::indoc; use shared::fixture; /////////////////////////////////////////////////////////////////////////////// #[tokio::test] async fn test_service() { let ctx = fixture("tickers.spy").await; let resp = datafusion_odata::handlers::odata_service_handler(axum::Extension(ctx)) .await .unwrap(); pretty_assertions::assert_eq!( *resp.body(), indoc!( r#" default covid19.canada tickers.spy "# ) .replace('\n', "") ); } /////////////////////////////////////////////////////////////////////////////// #[tokio::test] async fn test_metadata() { let ctx = fixture("tickers.spy").await; let resp = datafusion_odata::handlers::odata_metadata_handler(axum::Extension(ctx)) .await .unwrap(); pretty_assertions::assert_eq!( *resp.body(), indoc!( r#" "# ) .replace('\n', "") ); }