mod common;
use axum::body::Body;
use axum::http::Method;
use axum::http::Request;
use axum::http::StatusCode;
use common::Environment;
use tower::Service;
/// frontpage tests:
/// - Instrumentality serves an OK response to a request to the root.
#[tokio::test]
async fn frontpage() {
let mut env: Environment = Environment::default().await;
let res = env
.app
.call(
Request::builder()
.method(Method::GET)
.uri("/")
.body(Body::empty())
.unwrap(),
)
.await
.unwrap();
assert_eq!(res.status(), StatusCode::OK);
env.cleanup().await;
}