Compare commits
No commits in common. "8aea2c5326bb94eb1ec3e9d301c63b0ac0a15769" and "077a50e733d0ba1ccd144f7243c733eec8f473c8" have entirely different histories.
8aea2c5326
...
077a50e733
4 changed files with 10 additions and 19 deletions
|
@ -5,7 +5,11 @@
|
|||
[org.domaindrivenarchitecture.activity-pub-poc.owl :as owl]
|
||||
[org.domaindrivenarchitecture.activity-pub-poc.xsd :as xsd]))
|
||||
|
||||
|
||||
(defn-spec
|
||||
is-functional-property? boolean?
|
||||
"Checks whether spec is a FunctionalProperty."
|
||||
[spec keyword?]
|
||||
(some #(clojure.string/includes? % "FunctionalProperty") (s/describe spec)))
|
||||
|
||||
;=======================
|
||||
|
||||
|
|
|
@ -11,10 +11,4 @@
|
|||
(s/and
|
||||
(s/or
|
||||
:no-map #(not (map? %))
|
||||
:map spec)))
|
||||
|
||||
(defn-spec
|
||||
is-functional-property? boolean?
|
||||
"Checks whether spec is a FunctionalProperty."
|
||||
[spec s/spec?]
|
||||
(some #(clojure.string/includes? % "FunctionalProperty") (s/describe spec)))
|
||||
:map spec)))
|
|
@ -5,6 +5,10 @@
|
|||
[clojure.spec.alpha :as s]
|
||||
[org.domaindrivenarchitecture.activity-pub-poc.activitystreams2 :as sut]))
|
||||
|
||||
(deftest shoult-test-spec-for-having-functional-property
|
||||
(is (sut/is-functional-property? ::sut/id))
|
||||
(is (not (sut/is-functional-property? ::sut/Like))))
|
||||
|
||||
(deftest id-test
|
||||
(is (s/valid? ::sut/id "https://social.bla/alyssa/status/RANDOMHASH"))
|
||||
(is (not (s/valid? ::sut/id nil)))
|
|
@ -1,11 +0,0 @@
|
|||
(ns org.domaindrivenarchitecture.activity-pub-poc.spec-helper-test
|
||||
(:require
|
||||
[clojure.test :refer [deftest is are testing run-tests]]
|
||||
[clojure.spec.test.alpha :as st]
|
||||
[clojure.spec.alpha :as s]
|
||||
[org.domaindrivenarchitecture.activity-pub-poc.activitystreams2 :as as2]
|
||||
[org.domaindrivenarchitecture.activity-pub-poc.spec-helper :as sut]))
|
||||
|
||||
(deftest shoult-test-spec-for-having-functional-property
|
||||
(is (sut/is-functional-property? ::as2/id))
|
||||
(is (not (sut/is-functional-property? ::as2/Like))))
|
Loading…
Reference in a new issue