[][src]Module preroll::test_utils

Utilities for setting up mock clients and test servers with similar features to preroll::main!

Functions

assert_json_error

A test helper to assert on well structred errors produced by the JsonErrorMiddleware.

create_client

Creates a test application with routes and mocks set up, and hands back a client which is already connected to the server.

create_client_and_postgrespostgres

Creates a test application with routes and mocks set up, and hands back a client which is already connected to the server.

mock_client

Creates a mock client directly connected to a server which is setup by the provided function.

Type Definitions

TestResult

The result type to use for tests.