From 53191510ac6fb91e86cb9cccbc7bd295c9cbd59a Mon Sep 17 00:00:00 2001 From: Josha von Gizycki Date: Mon, 8 Oct 2018 14:42:30 +0200 Subject: [PATCH] fix code style --- src/formulare/core.clj | 6 +----- test/formulare/theme_test.clj | 8 -------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/formulare/core.clj b/src/formulare/core.clj index d6d94c9..d67ba53 100644 --- a/src/formulare/core.clj +++ b/src/formulare/core.clj @@ -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 diff --git a/test/formulare/theme_test.clj b/test/formulare/theme_test.clj index d4a1e27..3dc8117 100644 --- a/test/formulare/theme_test.clj +++ b/test/formulare/theme_test.clj @@ -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