 (ns desdemona.query-test
   (:require
    [desdemona.query :as q]
-   [clojure.test :refer [deftest is are]]))
+   [clojure.test :refer [deftest is are testing]]))
 
 (def dsl->logic
   @#'desdemona.query/dsl->logic)

    []

    '(l/featurec x {:ip "10.0.0.1"})
    [[{:ip "10.0.0.1"}]]))

    [[{:ip "10.0.0.1"}]]

    '(= (:ip x) "BOGUS")
    [])
  (testing "explicit maximum number of results"
    (are [n-results]
        (= [[{:ip "10.0.0.1"}]]
           (q/run-dsl-query n-results '(= (:ip x) "10.0.0.1") events))
      1
      10)))

(deftest logic-query-tests
  (are [query results] (= results (q/run-logic-query query events))
