integration-tests
Josha von Gizycki 6 years ago
parent f98f0a617f
commit 88213b8d5d

@ -47,7 +47,7 @@
(field form-def field-id req (field form-def field-id req
(get-in req [:params field-id]))) (get-in req [:params field-id])))
([form-def field-id req field-value] ([form-def field-id req field-value]
{:pre [(spec/valid? ::form form-def)]} {:pre [(spec/valid? ::form form-def)]}
(let [field-def (get-in form-def [:fields field-id]) (let [field-def (get-in form-def [:fields field-id])
{:keys [label required] spec-key :spec} field-def] {:keys [label required] spec-key :spec} field-def]
(list (when-not (field-valid? field-value spec-key req) (list (when-not (field-valid? field-value spec-key req)

@ -26,7 +26,7 @@
clojure.string/trim-newline clojure.string/trim-newline
clojure.string/split-lines clojure.string/split-lines
(map clojure.string/trim) (map clojure.string/trim)
(filter #(> (count %) 0)) (filter #(pos? (count %)))
(clojure.string/join \newline))) (clojure.string/join \newline)))
(defn exec-query! [qry params] (defn exec-query! [qry params]

@ -6,9 +6,9 @@
(defn btnlink (defn btnlink
([target caption] ([target caption]
(btnlink target caption "")) (btnlink target caption ""))
([target caption class] ([target caption clss]
[:a {:href target} [:a {:href target}
[:button {:class class} [:button {:class clss}
caption]])) caption]]))
(defn layout! (defn layout!

@ -32,12 +32,12 @@
SET s.created_at = {created_at} SET s.created_at = {created_at}
RETURN s") RETURN s")
(defn create-new! [name user-uuid] (defn create-new! [schema-name user-uuid]
(->> (->>
(neo4j/exec-query! (neo4j/exec-query!
create-new create-new
{:u_uuid user-uuid {:u_uuid user-uuid
:name name :name schema-name
:s_uuid (neo4j/uuid) :s_uuid (neo4j/uuid)
:created_at (neo4j/now-str)}) :created_at (neo4j/now-str)})
first first

@ -17,7 +17,7 @@
RETURN n") RETURN n")
(defn find! [ident] (defn find! [ident]
(->> (->>
(neo4j/exec-query! (neo4j/exec-query!
find-user find-user
{:ident ident}) {:ident ident})

Loading…
Cancel
Save