Implemented middleware in a somewhat stateless fashion

This commit is contained in:
didier amyot committed 2018-07-14 20:22:00 -04:00
1 parent 0ccbb6bc1a
commit f224665367
11 files changed
+124 -159

No files matched your search

+9
View File
@@ -2,3 +2,12 @@
(:require [midje.sweet :refer :all]
[skirmish.middleware.core :refer :all]))
(defn all? [xf]
#(every? true? (sequence xf %)))
(facts "we should have a async/chan base middleware for developing."
(fact "It should exchanges for each security in the config"
(let [config {:securities [{:sec-id :molly} {:sec-id :pepper}]}
exchanges (create-exchange-apis-for config)]
(keys exchanges) => [:molly :pepper]
(vals exchanges) => #(every? map? %))))