Liking cljdoc? Tell your friends :D

resend-clojure.internal.http-mock-adapter

A MockAdapter that avoids real HTTP calls in unit tests.

Pattern: record captures the canned responses you want to return, plus a calls atom that logs every request for assertion.

A MockAdapter that avoids real HTTP calls in unit tests.

Pattern: record captures the canned responses you want to return,
plus a `calls` atom that logs every request for assertion.
raw docstring

all-callsclj

(all-calls adapter)

Returns all recorded request maps.

Returns all recorded request maps.
sourceraw docstring

call-countclj

(call-count adapter)

Returns how many requests were made.

Returns how many requests were made.
sourceraw docstring

last-callclj

(last-call adapter)

Returns the most recent request map recorded by the adapter.

Returns the most recent request map recorded by the adapter.
sourceraw docstring

make-mock-adapterclj

(make-mock-adapter responses)

Creates a MockAdapter that returns responses in round-robin order.

Example: (make-mock-adapter [{:status 200 :body {:id "abc123"}}])

Creates a MockAdapter that returns `responses` in round-robin order.

Example:
  (make-mock-adapter [{:status 200 :body {:id "abc123"}}])
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close