[−][src]Module actix_web::test
Various helpers for Actix applications to use during testing.
Structs
TestBuffer | Async io buffer |
TestRequest | Test |
Functions
block_fn | Runs the provided function, blocking the current thread until the result future completes. |
block_on | Runs the provided future, blocking the current thread until the future completes. |
call_service | Calls service and waits for response future completion. |
default_service | Create service that responds with response with specified status code |
init_service | This method accepts application builder instance, and constructs service. |
ok_service | Create service that always responds with |
read_body | Helper function that returns a response body of a ServiceResponse. This function blocks the current thread until futures complete. |
read_response | Helper function that returns a response body of a TestRequest This function blocks the current thread until futures complete. |
read_response_json | Helper function that returns a deserialized response body of a TestRequest This function blocks the current thread until futures complete. |
run_on | Runs the provided function, with runtime enabled. |