Skip to main content

Module http_call

Module http_call 

Source
Expand description

Shared HTTP-test driver.

Calls trait primitives on a TestClientRenderer in the canonical order a TestClient-driven test takes:

  1. render_test_open — doc, signature, opening brace, language-native skip annotation.
  2. render_calllet response = client.METHOD(...).
  3. render_assert_status — status code assertion.
  4. render_assert_header (per header) — header assertions.
  5. render_assert_json_body / render_assert_partial_body — body assertion.
  6. render_assert_validation_errors — 422 validation errors, if present.
  7. render_test_close — closing brace / end.

Steps 3-6 are skipped automatically when the corresponding expectation is empty.

Constants§

DEFAULT_RESPONSE_VAR
Default name for the response binding inside a generated test.

Functions§

render_http_test
Render a single HTTP test for fixture to out using renderer.