Skip to content

Commit a2beb80

Browse files
committed
Replace clj-http core tests
Accidentally used unreleased tests; head-with-body relied on unreleased code
1 parent 7676c44 commit a2beb80

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

test/aleph/http/clj_http/core_test.clj

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@
107107
{:status 200 :body "delete-with-body"}
108108
[:post "/multipart"]
109109
{:status 200 :body (:body req)}
110-
[:head "/head-with-body"]
111-
{:status 200 :headers {"body" (slurp (:body req))}}
112110
[:get "/get-with-body"]
113111
{:status 200 :body (:body req)}
114112
[:options "/options"]
@@ -150,11 +148,6 @@
150148
(defonce ^org.eclipse.jetty.server.Server server
151149
(ring/run-jetty (add-headers-if-requested #'handler) {:port 18080 :join? false})))
152150

153-
(defn restart-server
154-
[]
155-
(.stop server)
156-
(.start server))
157-
158151
(defn localhost [path]
159152
(str "http://localhost:18080" path))
160153

@@ -166,7 +159,6 @@
166159
(defn slurp-body [req]
167160
(slurp (:body req)))
168161

169-
170162
(deftest ^:integration makes-get-request
171163
(run-server)
172164
(let [resp (request {:request-method :get :uri "/get"})]
@@ -422,10 +414,8 @@
422414

423415
(deftest ^:integration head-with-body
424416
(run-server)
425-
(let [resp (request {:request-method :head :uri "/head-with-body"
426-
:body (.getBytes "foo")})]
427-
(is (= 200 (:status resp)))
428-
(is (= "foo" (get-in resp [:headers "body"])))))
417+
(let [resp (request {:request-method :head :uri "/head" :body "foo"})]
418+
(is (= 200 (:status resp)))))
429419

430420
(deftest ^:integration t-clojure-output-coercion
431421
(run-server)

0 commit comments

Comments
 (0)