assert_has_header

Macro assert_has_header 

Source
macro_rules! assert_has_header {
    ($res:expr, $header:ident) => { ... };
    ($res:expr, $header:expr) => { ... };
}
Expand description

Assertion macro to indicate that a Response has the header it needs.

§Example

let res = Response::builder()
    .status(StatusCode::OK)
    .header("Accept", "application/json")
    .body(())
    .expect("response to be avaliable");

charted_testkit::assert_has_header!(res, header::ACCEPT);