fixed test added Note

This commit is contained in:
Clemens 2023-07-14 13:47:59 +02:00
parent 9e46120bf1
commit 7a89569f66
3 changed files with 10 additions and 6 deletions

View file

@ -39,6 +39,11 @@
(s/def ::Relationship (s/keys :req-un [::object ::und-mehr]))
; #### NOTE ####
; Specialities of mastodon statuses: https://docs.joinmastodon.org/spec/activitypub/#status
(s/def ::Note (s/and ::Object
(match-type "Note")))
; #### ACTIVITY ####
(s/def ::Activity (s/merge
::Object

View file

@ -67,7 +67,7 @@
actor
object]))
(def like-data? (s/keys :req-un [::to ::object ::from]))
(def like-data? (s/keys :req-un [::object ::from]))
(def activity-streams-context "https://www.w3.org/ns/activitystreams")

View file

@ -7,15 +7,14 @@
(st/instrument `sut/generate-like-map)
(def test-like-data
{:to "https://chatty.bla/ben/"
:target "posts/234s23-2g34234-2hhj536"
{:object "posts/234s23-2g34234-2hhj536"
:from "https://social.bla/alyssa/"})
(deftest produces-valid-like
(is (= {"@context" "https://www.w3.org/ns/activitystreams",
"id" "https://social.bla/alyssa/#likes/RANDOMHASH",
"type" "Like",
"id" "https://social.bla/alyssa/out/sdfsd44243g324g3455",
"to" "https://chatty.bla/ben/",
"actor" "https://social.bla/alyssa/",
"object" "posts/234s23-2g34234-2hhj536"}
(sut/generate-like-map test-like-data))))
(sut/generate-like-map test-like-data))))