diff --git a/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc b/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc index 31674d0..093e800 100644 --- a/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc +++ b/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc @@ -48,6 +48,7 @@ ;TODO: definition in progress (s/def ::Link (s/keys :opt-un [::id])) +;TODO: There is no as:Class! Why do we need this? (s/def ::Class (s/merge ::owl/Class diff --git a/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.clj b/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.clj index 1ef4f0b..c9109ac 100644 --- a/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.clj +++ b/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.clj @@ -14,4 +14,18 @@ (is (not (s/valid? ::sut/id nil))) (is (not (s/valid? ::sut/id 2))) (is (not (s/valid? ::sut/id "no-uri"))) - ) \ No newline at end of file + (is (not (s/valid? ::sut/id ["https://social.bla/alyssa/status/RANDOMHASH", "https://social.bla/alyssa/status/RANDOMHASH2"]))) + ) + +(deftest result-test + (is (s/valid? ::sut/result "https://social.bla/alyssa/result/RANDOMHASH")) + (is (s/valid? ::sut/result {:type "http://www.types.example/flightstatus", :name "On Time"})) + (is (s/valid? ::sut/result {:type "Link" :href "http://www.target.de"})) + (is (not (s/valid? ::sut/result nil))) + (is (not (s/valid? ::sut/result 47))) +) + + +;(deftest attachment-test +; (is (s/valid? ::sut/attachment)) +; ) \ No newline at end of file