diff --git a/src/test/clj/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_legacy_test.clj b/src/test/clj/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_legacy_test.clj index 5719928..5bb2b87 100644 --- a/src/test/clj/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_legacy_test.clj +++ b/src/test/clj/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_legacy_test.clj @@ -5,13 +5,6 @@ [clojure.spec.alpha :as s] [org.domaindrivenarchitecture.activity-pub-poc.activitystreams2-legacy :as sut])) -(deftest id-test - (is (s/valid? ::sut/id "https://social.bla/alyssa/status/RANDOMHASH"))) - - - - - ;(deftest Note-test ; (is (s/valid? 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 08f784d..1ef4f0b 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 @@ -7,4 +7,11 @@ (deftest shoult-test-spec-for-having-functional-property (is (sut/is-functional-property? ::sut/id)) - (is (not (sut/is-functional-property? ::sut/Like)))) \ No newline at end of file + (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))) + (is (not (s/valid? ::sut/id 2))) + (is (not (s/valid? ::sut/id "no-uri"))) + ) \ No newline at end of file diff --git a/src/test/resources/like.json b/src/test/resources/like.json index 5566c6b..ffd8244 100644 --- a/src/test/resources/like.json +++ b/src/test/resources/like.json @@ -1 +1,11 @@ -{"@context":"https://www.w3.org/ns/activitystreams","id":"https://social.bla/alyssa#likes/RANDOMHASH","type":"Like","to":["https://chatty.bla/ben","https://chatty.bla/gen"],"actor":"https://social.bla/alyssa","object":"https://chatty.bla/ben/posts/234s23-2g34234-2hhj536"} \ No newline at end of file +{ + "@context": "https://www.w3.org/ns/activitystreams", + "id": "https://social.bla/alyssa#likes/RANDOMHASH", + "type": "Like", + "to": [ + "https://chatty.bla/ben", + "https://chatty.bla/gen" + ], + "actor": "https://social.bla/alyssa", + "object": "https://chatty.bla/ben/posts/234s23-2g34234-2hhj536" +} \ No newline at end of file