Includes:
read-body
multimethod for parsing response bodies of different types (transit, json etc)Includes: * Macros and a fixture for dealing with a system for the duration of a test * Helpers for composing and dispatching requests * `read-body` multimethod for parsing response bodies of different types (transit, json etc) * assertions that work with response segments
(comparison-entities test-ent-attrs resp-data)
Returns a set that can be used to test if test-ent-attrs
is
contained in a response
Returns a set that can be used to test if `test-ent-attrs` is contained in a response
(configured-instance human-name component-config-id)
Look up a component instance that has path configured by the ::config
component group
Look up a component instance that has path configured by the `::config` component group
(configured-value config-key)
Look up a component instance that has path configured by the ::config
component group
Look up a component instance that has path configured by the `::config` component group
(contains-entity? resp-data test-ent-attrs)
Request's response data creates entity of type ent-type
that has
key/value pairs identical to test-ent-attrs
.
Request's response data creates entity of type `ent-type` that has key/value pairs identical to `test-ent-attrs`.
(content-type-request method path-or-route-name content-type)
(content-type-request method path-or-route-name params content-type)
(handle-request method path-or-route-name & args)
Perform a request with the system's root handler
Perform a request with the system's root handler
(instance component-id & [err-msg])
Look up component instance in current test system
Look up component instance in current test system
(path this)
(prep-comparison resp-entity test-ent-attrs)
When testing whether a response contains test-ent-attrs
, we modify
a response entity by:
selecting only the keys that are present in
test-ent-attrs
. This allows us to do an =
comparison that won't
fail if the response entity contains attributes we don't want to
test.
Putting the result in a map to handle case where resp-entity
is
a record.
When testing whether a response contains `test-ent-attrs`, we modify a response entity by: 1. selecting only the keys that are present in `test-ent-attrs`. This allows us to do an `=` comparison that won't fail if the response entity contains attributes we don't want to test. 2. Putting the result in a map to handle case where `resp-entity` is a record.
Read body according to content type
Read body according to content type
(request method path-or-route-name)
(request method path-or-route-name params-or-content-type)
(request method path-or-route-name params content-type)
(response-entities resp-data)
Walk response data and return all entities from entity segments
Walk response data and return all entities from entity segments
(route-path route-name)
(route-path route-name route-params)
(route-path route-name route-params query-params)
(system-fixture {:keys [system-name custom-config]})
To be used with use-fixtures
To be used with `use-fixtures`
(with-system {:keys [system-name custom-config]} & body)
Bind dynamic system var to a test system.
Bind dynamic system var to a test system.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close