Browse Source

Fix broken raw test

Zane Kansil 10 years ago
parent
commit
d640ae41f3

+ 1 - 2
frameworks/Clojure/compojure/hello/project.clj

@@ -9,8 +9,7 @@
                  [mysql/mysql-connector-java "5.1.6"]
                  [org.clojure/java.jdbc "0.3.0-alpha1"]
                  [c3p0/c3p0 "0.9.1.2"]
-                 [hiccup "1.0.4"]
-                 ]
+                 [hiccup "1.0.4"]]
   :plugins [[lein-ring "0.8.10"]]
   :ring {:handler hello.handler/app}
   :profiles

+ 3 - 2
frameworks/Clojure/compojure/hello/src/hello/handler.clj

@@ -156,7 +156,7 @@
   "Changes the :randomNumber of a number of world entities.
   Persists the changes to sql then returns the updated entities"
   [queries]
-  (let [results (-> (run-queries queries))]
+  (let [results (run-queries queries)]
     (for [w results]
       (update-in w [:randomNumber (inc (rand-int 9999))]
         (update world
@@ -164,6 +164,7 @@
                 (where {:id [:id w]}))))
     results))
 
+
 (def json-serialization
   "Test 1: JSON serialization"
   (response {:message "Hello, World!"}))
@@ -198,8 +199,8 @@
   "Test 3: Multiple database queries (raw)"
   [queries]
   (-> queries
+      (get-query-count)
       (run-queries-raw)
-      (first)
       (response)))