diff --git a/src/test/clj/org/domaindrivenarchitecture/activity_pub_poc/core_test.clj b/src/test/clj/org/domaindrivenarchitecture/activity_pub_poc/core_test.clj index 621df7d..4bb3f1f 100644 --- a/src/test/clj/org/domaindrivenarchitecture/activity_pub_poc/core_test.clj +++ b/src/test/clj/org/domaindrivenarchitecture/activity_pub_poc/core_test.clj @@ -1,6 +1,21 @@ (ns org.domaindrivenarchitecture.activity-pub-poc.core-test - (:require [clojure.test :refer :all] - [org.domaindrivenarchitecture.activity-pub-poc.core :as sut])) + (:require + [clojure.test :refer [deftest is are testing run-tests]] + [clojure.spec.test.alpha :as st] + [org.domaindrivenarchitecture.activity-pub-poc.core :as sut])) -(deftest get-property-type-from-ld-resource - (is (= 0 1))) \ No newline at end of file +(st/instrument `sut/generate-like-map) + +(def test-like-data + {:to "https://chatty.bla/ben/" + :target "posts/234s23-2g34234-2hhj536" + :from "https://social.bla/alyssa/"}) + +(deftest produces-valid-like + (is (= {"@context" "https://www.w3.org/ns/activitystreams", + "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)))) \ No newline at end of file