Skip to content

What blocks then conditions don't allow for custom functions.  #35

@drewverlee

Description

@drewverlee

Here is a failing test that should pass, but doesn't, that demonstrates the issue:

(deftest allow-for-custom-then-functions
  (let [falsy  (fn [new old] false)
        fired? (atom false)]
    (-> (reduce o/add-rule (o/->session)
                (o/ruleset
                  {::rule1
                   [:what
                    [pid ::foo foo {:then falsy}]
                    :then
                    (println "fired")
                    (reset! fired? true)]}))
        (o/insert 1 ::foo "")
        o/fire-rules)
    (is (= @fired? false))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions