Liking cljdoc? Tell your friends :D

clj-momo.test-helpers.http-assert-1


assert-postclj

(assert-post path port api-key new-entity)

Like test-post, but instead of using (is (= ...)), it only asserts that the status is 200. Useful when the post is for test setup and the path is not the subject under test.

Like test-post, but instead of using (is (= ...)), it only asserts
that the status is 200.  Useful when the post is for test setup and
the path is not the subject under test.
sourceraw docstring

test-deleteclj

(test-delete path port api-key)

Helper which test a delete request occurs with success

Helper which test a delete request occurs with success
sourceraw docstring

test-getclj

(test-get path port api-key expected-entity)

Helper which test a get request occurs with success and return the right object Returns the result of the GET call.

Helper which test a get request occurs with success and return the right object
Returns the result of the GET call.
sourceraw docstring

test-get-listclj

(test-get-list path port api-key expected-entities)

Helper which test a get request occurs with success and returns the same list of objects in any order. Returns the result of the GET call.

Helper which test a get request occurs with success and returns
the same list of objects in any order.
Returns the result of the GET call.
sourceraw docstring

test-postclj

(test-post path port api-key new-entity)

Like a simplified POST request but with testing points. It uses the standard api-key. It verify that the POST was successful and that the returned entity correpond the the one sent. In the end the test-post returns only the entity (parsed body).

Like a simplified POST request but with testing points.
It uses the standard `api-key`.
It verify that the POST was successful and that the returned entity
correpond the the one sent.
In the end the test-post returns only the entity (parsed body).
sourceraw docstring

test-putclj

(test-put path port api-key new-entity)

Like a simplified PUT request but with testing points. It uses the standard api-key. It verify that the PUT was successful and that the returned entity correpond the the one sent. In the end the test-post returns only the entity (parsed body).

Like a simplified PUT request but with testing points.
It uses the standard `api-key`.
It verify that the PUT was successful and that the returned entity
correpond the the one sent.
In the end the test-post returns only the entity (parsed body).
sourceraw docstring

with-port-fn-and-api-keyclj

(with-port-fn-and-api-key port-fn api-key http-fn)

Similar to with-port-fn, but the http-fn has a different signature (to match the test-* fns above)

Similar to with-port-fn, but the http-fn has a different signature
(to match the test-* fns above)
sourceraw docstring

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

× close