Fork me on GitHub

And maybe an integration testing would be to compose "unit tests". for example - List resources: empty - Create resource: return resource - List resource: list with the created resource - Update the resource: return the updated resource ...and so on. Is this the idea of an integration testing?


I think that’s consistent with integration testing. In my experience, the term integration testing has been used to describe end-to-end tests which exercise the system in the context of backing infrastructure/dependencies (i.e., real database, externally deployed services, etc…)


For the unit test, we could also use let to get the response and use it to multiple "assertions"

(let [response (response-for service
                             :post "/foo"
                             :headers {"Content-Type" "application/json"}
                             :body "{\"foo\":\"bar\"}")]
  (is (= 200 (:status response)))
  (is (= {"foo": "bar"} (:body response))))