Skip to main content

assert_not_handled

Macro assert_not_handled 

Source
macro_rules! assert_not_handled {
    ($conn:expr_2021) => { ... };
}
Expand description

assert that all of the following are true: the status was not set the body was not set the conn was not halted

use trillium_testing::prelude::*;
async fn handler(conn: trillium::Conn) -> trillium::Conn {
    conn
}

assert_not_handled!(get("/").on(&handler));

let conn = get("/").on(&handler);
assert_not_handled!(&conn);
assert_not_handled!(conn);
use trillium_testing::prelude::*;
async fn handler(conn: trillium::Conn) -> trillium::Conn {
    conn.ok("handled")
}

assert_not_handled!(get("/").on(&handler));