From 72a51b3f2c4c954121e8a5cb8955a86338936e79 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 28 Jul 2023 17:42:07 +0200 Subject: [PATCH] finished attachment --- .../activity_pub_poc/activitystreams2.cljc | 3 +-- .../activity_pub_poc/activitystreams2_test.cljc | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) 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 21807d1..872d692 100644 --- a/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc +++ b/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc @@ -47,11 +47,10 @@ ::Activity)) ;http://www.w3.org/ns/activitystreams#attachment -; TODO: Why do we need to model this? Is this necessary for a Like-Activity? (s/def ::attachment (s/and - ::owl/Class ::owl/ObjectProperty + ::owl/Class ::Object ::Link)) diff --git a/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc b/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc index 136504f..29fdd13 100644 --- a/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc +++ b/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc @@ -29,6 +29,8 @@ (is (not (s/valid? ::sut/result 47)))) -;(deftest attachment-test -; (is (s/valid? ::sut/attachment)) -; ) \ No newline at end of file +(deftest attachment-test + (is (s/valid? ::sut/attachment + [{:type "Image", + :content "This is what he looks like.", + :url "http://example.org/cat.jpeg"}])))