Skip to content

Commit

Permalink
Made test to reproduce issue-1 standalone.
Browse files Browse the repository at this point in the history
  • Loading branch information
neotyk committed Jul 21, 2010
1 parent a6bf0a9 commit b94d8db
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/async/http/client/test.clj
Expand Up @@ -70,6 +70,10 @@
(future
(if @prom
(.complete cont)))))
"/issue-1" (let [writer (.getWriter hResp)]
(doto writer
(.write "глава")
(.flush)))
(doseq [n (enumeration-seq (.getParameterNames hReq))]
(doseq [v (.getParameterValues hReq n)]
(.addHeader hResp n v))))
Expand Down Expand Up @@ -282,7 +286,8 @@
(is (or (= "part1" s) (= "part2" s))))))

(deftest issue-1
(let [resp (GET "http://gettingreal.37signals.com/GR_rus.php")
(let [resp (GET "http://localhost:8123/issue-1")
headers (:headers @resp)
body (apply str (map char (:body @resp)))]
(is (= (:content-length headers) (count body)))))
(is (= (:content-length headers) (count body)))
(is (= ("глава" body)))))

0 comments on commit b94d8db

Please sign in to comment.