Feature complete for version 1; some refactoring still needed.

This commit is contained in:
Simon Brooke 2014-07-24 18:44:04 +01:00
parent a0f59ac2dd
commit 98e43dbe8f
10 changed files with 190 additions and 84 deletions

View file

@ -6,8 +6,8 @@
;; Test file specifically to test the helper function in rules handler
(deftest test-rules-processor
(testing "Rules processor"
(let [request {:src "if state is new and altitude is less than 10 then state should be water"}
(let [request {:form-params {:src "if state is new and altitude is less than 10 then state should be water"}}
response (process-rules-request request)]
(is (= (:message response) "Successfully compiled 1 rules"))
(is (= (count (:rules response)) 1))
(is (= (:rule-text response) (:src request))))))
(is (= (:rule-text response) (:src (:form-params request)))))))