 
 (deftest invalid-http-step-tests
   (are [step expected] (let [create-result @(create-cap step)
-                             message (bs/to-string (:body create-result))]
-                         (= message expected))
+                             message (get-body create-result)]
+                         (= message {:error expected}))
        {:type :http} '{:url missing-required-key}))

  (let [create-result @(create-cap {:type :http
                                    :url (str http-server-base-url
                                              "/test/example")})
        cap-url (spy (bs/to-string (:body create-result)))
        exercise-result @(execute-cap cap-url)]
    (is (= (select-keys create-result [:code])
           {:code 201}))

            [clojure.test :refer :all]
            [aleph.http :as http]
            [manifold.deferred :refer [let-flow]]
            [taoensso.timbre :refer [info spy]]))

(def ^:dynamic http-server)
