View Source OrbitTest (Orbit v0.2.2)

Test helpers.

Link to this section Summary

Functions

Returns the response body as a binary.

Returns the response meta field.

Performs a request and returns the processed request.

Returns the response status code as an atom.

Link to this section Functions

Returns the response body as a binary.

Returns nil if the status was not a success.

Link to this function

build_client_cert(common_name, opts \\ [])

View Source

Returns a new self-signed Orbit.ClientCertificate for testing.

options

Options

  • :days - the number of days of validity; defaults to 1 day

Returns the response meta field.

Link to this macro

request(path_or_url, opts \\ [])

View Source (macro)

Performs a request and returns the processed request.

If path_or_url begins with "/", a path is assumed and the requested URL is "gemini://localhost/<path>".

options

Options

  • :client_cert - the client certificate, which can be constructed with build_client_cert/2
  • :query - the URL query string, or key/value pairs as a map or keyword list
  • :router - the router to handle the request; defaults to @router

Returns the response status code as an atom.