Skip to content
Browse files

Fixed tests

  • Loading branch information...
1 parent cd6876b commit 583236ea94053563eb0400ea90eff4e470dee22a @weavejester committed
Showing with 5 additions and 5 deletions.
  1. +1 −1 src/compojure/core.clj
  2. +4 −4 test/compojure/test/response.clj
View
2 src/compojure/core.clj
@@ -61,7 +61,7 @@
(if-let [route-params# (route-matches route# request#)]
(let [request# (#'assoc-route-params request# route-params#)]
(bind-request request# ~bindings
- (render request# (do ~@body)))))))))
+ (render (do ~@body) request#))))))))
(defn routes
"Create a Ring handler by combining several handlers into one."
View
8 test/compojure/test/response.clj
@@ -3,7 +3,7 @@
(:require [compojure.response :as response]))
(deftest response-with-nil
- (is (nil? (response/render {} nil))))
+ (is (nil? (response/render nil {}))))
(def test-response
{:status 200
@@ -11,13 +11,13 @@
:body "<h1>Foo</h1>"})
(deftest response-with-string
- (is (= (response/render {} "<h1>Foo</h1>")
+ (is (= (response/render "<h1>Foo</h1>" {})
test-response)))
(deftest response-with-fn
- (is (= (response/render {} (constantly test-response))
+ (is (= (response/render (constantly test-response) {})
test-response)))
(deftest response-with-deref
- (is (= (response/render {} (future test-response))
+ (is (= (response/render (future test-response) {})
test-response)))

0 comments on commit 583236e

Please sign in to comment.
Something went wrong with that request. Please try again.