renamed atompath to ATOM
This commit is contained in:
parent
7b33c93132
commit
c280b40b12
2 changed files with 6 additions and 1 deletions
|
|
@ -281,7 +281,7 @@
|
||||||
|
|
||||||
(defpath
|
(defpath
|
||||||
^{:doc "Navigates to atom value."}
|
^{:doc "Navigates to atom value."}
|
||||||
atompath
|
ATOM
|
||||||
[]
|
[]
|
||||||
(select* [this structure next-fn]
|
(select* [this structure next-fn]
|
||||||
(next-fn @structure))
|
(next-fn @structure))
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,11 @@
|
||||||
(is (= 5 (s/select-one (s/comp-paths :a :b) {:a {:b 5}})))
|
(is (= 5 (s/select-one (s/comp-paths :a :b) {:a {:b 5}})))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(deftest atom-test
|
||||||
|
(let [v (s/transform s/ATOM inc (atom 1))]
|
||||||
|
(is (instance? clojure.lang.Atom v))
|
||||||
|
(is (= 2 (s/select-one s/ATOM v) @v))))
|
||||||
|
|
||||||
(defspec view-test
|
(defspec view-test
|
||||||
(for-all+
|
(for-all+
|
||||||
[i gen/int
|
[i gen/int
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue