Expand description
useful stuff for testing trillium apps
Re-exports§
pub use crate::assert_body;pub use crate::assert_body_contains;pub use crate::assert_headers;pub use crate::assert_not_handled;pub use crate::assert_ok;pub use crate::assert_response;pub use crate::assert_status;pub use crate::block_on;pub use crate::connector;pub use crate::init;pub use crate::methods::*;
Macros§
- assert_
body - assert that the response body is as specified. this assertion requires mutation of the conn.
- assert_
body_ contains - asserts that the response body matches the specified pattern, using
str::contains - assert_
headers - asserts any number of response headers
- assert_
not_ handled - assert that all of the following are true: the status was not set the body was not set the conn was not halted
- assert_
ok - assert_ok is like
assert_response!except it always asserts a status of 200 Ok. - assert_
response - combines several other assertions. this assertion can be used to assert: just a status code, a status code and a response body, or a status code, a response body, and any number of headers
- assert_
status - assert that the status code of a conn is as specified.
Structs§
- Conn
- A Trillium HTTP connection.