Module prelude

Source
Expand description

useful stuff for testing trillium apps

Re-exports§

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:
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:
assert_status
assert that the status code of a conn is as specified.

Structs§

Conn
A Trillium HTTP connection.

Enums§

Method
HTTP request methods.
Status
HTTP response status codes.

Functions§

block_on
Runs the global and the local executor on the current thread