integration-tests
Josha von Gizycki 6 years ago
parent 70d546749c
commit 2beac8fc47

@ -17,8 +17,8 @@
(-> (redirect (path :home))
(assoc-in [:session :ident] uname)
(assoc-in [:session :uuid] (:uuid unode)))
(-> (redirect (path :auth-login))
(assoc :flash :invalid-credentials)))))
(assoc (redirect (path :auth-login))
:flash :invalid-credentials))))
(defn login! [req]
(view/layout!
@ -40,5 +40,5 @@
(defroutes routes
(GET (register! :auth-login "/login") [] login!)
(POST (register! :auth-login-check "/login-check") [] login-check!)
(GET (register! :auth-logout "/logout") [] (-> (redirect "/login")
(assoc :session nil))))
(GET (register! :auth-logout "/logout") [] (assoc (redirect "/login")
:session nil)))

@ -10,12 +10,12 @@
duplicates (->> (attr-domain/find-by-schema! schema-uuid)
(map #(if (or (and (empty? attr-uuid)
(= name (:name %)))
(and (not (empty? attr-uuid))
(and (seq attr-uuid)
(= name (:name %))
(not= attr-uuid (:uuid %))))
1 0))
(apply +))]
(= 0 duplicates)))
(zero? duplicates)))
(spec/def ::unique-attr-name-per-schema
unique-attr-name-in-schema!)

Loading…
Cancel
Save