Maru v0.10.5 Maru.Test
Unittest wrapper for designated router.
Summary
Functions
Create a test connection
Get response from conn as json
Put body or params into conn
Put a plug called before endpoint into conn
Get response from conn as text
Functions
Create a test connection.
get("/")
is used to test a simple request.
build_conn/0
is useful when test a complex request with headers or params.
Examples
get("/", "v1")
build_conn() |> put_body_or_params("body params") |> post("/path", "v2")
build_conn() |> put_req_header("Authorisation", "something") |> get("/path")