add test for size option in mselect, inc clojure version

master
Josha von Gizycki 6 years ago
parent 02504897d2
commit cfedd5c1af

@ -4,7 +4,7 @@
:scm {:name "git" :url "https://gitea.heevyis.ninja/josha/formulare.git"} :scm {:name "git" :url "https://gitea.heevyis.ninja/josha/formulare.git"}
:license {:name "GPL-3.0" :license {:name "GPL-3.0"
:url "https://opensource.org/licenses/GPL-3.0"} :url "https://opensource.org/licenses/GPL-3.0"}
:dependencies [[org.clojure/clojure "1.9.0"] :dependencies [[org.clojure/clojure "1.10.0"]
[hiccup "1.0.5"] [hiccup "1.0.5"]
[ring/ring-anti-forgery "1.3.0"]] [ring/ring-anti-forgery "1.3.0"]]
:deploy-repositories [["clojars" {:sign-releases false :deploy-repositories [["clojars" {:sign-releases false

@ -73,7 +73,14 @@
(-> (render-widgets {:fields {:foo {:widget :mselect}}} (-> (render-widgets {:fields {:foo {:widget :mselect}}}
{} {}) {} {})
(nth 2) (nth 2)
(nth 2)))))) (nth 2)))))
(testing "size attribute is used"
(is (= 20 (-> (render-widgets {:fields {:foo {:widget :mselect :size 20}}}
{} {})
(nth 2)
(nth 2)
second
:size)))))
(deftest hidden-is-overridable (deftest hidden-is-overridable
(binding [*hidden-widget-theme* (fn [& _] \a)] (binding [*hidden-widget-theme* (fn [& _] \a)]

Loading…
Cancel
Save