Liking cljdoc? Tell your friends :D

dgknght.app-lib.test


attr-setclj

(attr-set attr ms)

Given a list of maps, return a set containing the values at the specified attribute for each map

Given a list of maps, return a set containing the
values at the specified attribute for each map
sourceraw docstring

multipart-bodyclj

(multipart-body request & bodies)

Creates and assoces a multipart body onto a a mock request.

(multipart-body req {:name "normal-field" :value "literal content"} {:name "file-field-1" :file-name "data.csv" :content-type "text/csv" :body csv-data-2} {:name "file-field-2" :file-name "more-data.csv" :content-type "text/csv" :body csv-data-2})

Creates and assoces a multipart body onto a a mock request.

(multipart-body req {:name "normal-field"
                     :value "literal content"}
                    {:name "file-field-1"
                     :file-name "data.csv"
                     :content-type "text/csv"
                     :body csv-data-2}
                    {:name "file-field-2"
                     :file-name "more-data.csv"
                     :content-type "text/csv"
                     :body csv-data-2})
sourceraw docstring

parse-html-bodyclj

(parse-html-body {:keys [body html-body] :as response})
source

parse-json-bodyclj

(parse-json-body {:keys [body json-body] :as response})
source

user-agentclj

(user-agent req user-agent)

Adds a user agent header to the request

Adds a user agent header to the request
sourceraw docstring

with-log-capturecljmacro

(with-log-capture bindings & body)
source

with-mail-capturecljmacro

(with-mail-capture bindings & body)

Intercepts calls to postal.core/send-message and places them in an atom that can be expected after running the code under test.

The bindings are in the first argument and contain: arg-name - the name of the binding for the atom containing the intercepted messages fn-name - (optional) the name of the function to redef. Defaults to postal.core/send-messages) arg-index - (optional) the index of the argument passed to the redeffed function that contains the message to be intercepted

Intercepts calls to postal.core/send-message and places them in an
atom that can be expected after running the code under test.

The bindings are in the first argument and contain:
  arg-name  - the name of the binding for the atom containing the intercepted messages
  fn-name   - (optional) the name of the function to redef. Defaults to postal.core/send-messages)
  arg-index - (optional) the index of the argument passed to the redeffed function that contains the message to be intercepted
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close