duct-framework / duct

Server-side application framework for Clojure
MIT License
1.13k stars 51 forks source link

+ataraxy fails kerodon tests #67

Closed zakak closed 7 years ago

zakak commented 7 years ago

Hello and thanks for all your open source work, including duct.

I noticed lein new duct demo +ataraxy +example creates tests that fail, though http://localhost/example loads fine in the browser.

The kerodon (status? 200) test is looking for [:response :status]:

;; with +ataraxy +example
(deftest smoke-test    
  (testing "example page exists"               
    (-> (session handler)                      
        (visit "/example") ;; {:response [:ataraxy.response/ok "This is an example handler"] ...}
        (has (status? 200) "page exists")))) ;; fails
;; with +example
(deftest smoke-test    
  (testing "example page exists"               
    (-> (session handler)                      
        (visit "/example")  ;; {:response {:status 200, :headers {"Content-Type" "text/html; charset=utf-8"}, :body "This is an example handler"}
        (has (status? 200) "page exists")))) ;; passes
weavejester commented 7 years ago

Thanks for opening the issue. Just wanted to say that I have actually noticed this, and that I'm thinking about how best to solve it.

weavejester commented 7 years ago

Should be fixed in 0.10.4.

zakak commented 7 years ago

Works for me now, thanks!