Skip to content

Commit

Permalink
less code
Browse files Browse the repository at this point in the history
  • Loading branch information
ikitommi committed Jan 4, 2024
1 parent 4c83055 commit c452388
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/malli/registry_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,17 @@
[:friends {:optional true} [:set [:ref #'User]]]])

(deftest var-registry-test
(let [var-registry (mr/var-registry)
registry (mr/composite-registry
(let [registry (mr/composite-registry
(m/default-schemas)
var-registry)
(mr/var-registry))
schema (m/schema User {:registry registry})]

(testing "getting schema over Var works"
(is (= UserId (mr/-schema var-registry #'UserId)))
(is (= User (mr/-schema var-registry #'User))))
(is (= UserId (mr/-schema (mr/var-registry) #'UserId)))
(is (= User (mr/-schema (mr/var-registry) #'User))))

(testing "we do not list all Var schemas (yet)"
(is (= nil (mr/-schemas var-registry))))
(is (= nil (mr/-schemas (mr/var-registry)))))

(testing "it works"
(is (= User (m/form schema)))
Expand Down

0 comments on commit c452388

Please sign in to comment.