fix code style

master
Josha von Gizycki 6 years ago
parent 0813a19dc7
commit 53191510ac

@ -5,9 +5,6 @@
[hiccup.core :as hcore]
[ring.util.anti-forgery :refer [anti-forgery-field]]))
(defn in? [coll x]
(some? (some (partial = x) coll)))
(spec/def ::label string?)
(spec/def ::required boolean?)
(spec/def ::spec
@ -18,8 +15,7 @@
:options (spec/coll-of (spec/tuple string? string?))))
(spec/def ::widget
#{:input :select :checkbox :textarea :mselect :hidden})
(spec/def ::from-req
(spec/and ifn? #_(= 1 (->> % meta :arglists (map count) first))))
(spec/def ::from-req ifn?)
(spec/def ::to-form ::from-req)
(spec/def ::field
(spec/keys :opt-un [::label

@ -51,14 +51,6 @@
(nth 2)
(nth 2))))))
(deftest checkbox-is-overridable
(binding [*checkbox-widget-theme* (fn [& _] \a)]
(is (= \a
(-> (render-widgets {:fields {:foo {:widget :checkbox}}}
{} {})
(nth 2)
(nth 2))))))
(deftest textarea-is-overridable
(binding [*textarea-widget-theme* (fn [& _] \a)]
(is (= \a

Loading…
Cancel
Save