refrakt/testing
Values
pub fn assert_header(
resp: response.Response(String),
name: String,
expected: String,
) -> Bool
Check that a response has a specific header value.
pub fn assert_status(
resp: response.Response(String),
expected: Int,
) -> Bool
Check that a response has a specific status code.
pub fn delete(path: String) -> request.Request(String)
Create a DELETE request for testing.
pub fn request(
method: http.Method,
path: String,
) -> request.Request(String)
Create a request with a specific method and path.
pub fn with_body(
req: request.Request(String),
body: String,
) -> request.Request(String)
Set the body of a test request.
pub fn with_header(
req: request.Request(String),
name: String,
value: String,
) -> request.Request(String)
Add a header to a test request.