diff --git a/test/babashka/http_client_test.clj b/test/babashka/http_client_test.clj index eacab4d..db9ac49 100644 --- a/test/babashka/http_client_test.clj +++ b/test/babashka/http_client_test.clj @@ -535,12 +535,18 @@ "q=%26moo")))))) (deftest ring-client-test - (let [resp (http/get "https://clojure.org" - {:client (fn [req] - {:body (java.io.ByteArrayInputStream. (.getBytes "Hello")) - :clojure (= "https://clojure.org" (str (:uri req)))})})] - (is (:clojure resp)) - (is (= "Hello" (:body resp))))) + (testing "string body" + (let [resp (http/get "https://clojure.org" + {:client (fn [_req] + {:body "Hello"})})] + (is (= "Hello" (:body resp))))) + (testing "inputstring body" + (let [resp (http/get "https://clojure.org" + {:client (fn [req] + {:body (java.io.ByteArrayInputStream. (.getBytes "Hello")) + :clojure (= "https://clojure.org" (str (:uri req)))})})] + (is (:clojure resp)) + (is (= "Hello" (:body resp)))))) (comment (run-server)