Function float

Source
pub fn float() -> ExpectFloat
Expand description

Expects a valid email address in the received JSON.

use axum_test::expect_json;

let server = TestServer::new(Router::new())?;

server.get(&"/user/barrington")
    .await
    .assert_json(&json!({
        "name": "Barrington",
        "height_in_meters": expect_json::float().is_in_range(0.5..=2.5),
    }));