diff --git a/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/core.cljc b/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/core.cljc new file mode 100644 index 0000000..354d2a2 --- /dev/null +++ b/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/core.cljc @@ -0,0 +1,5 @@ +(ns org.domaindrivenarchitecture.activity-pub-poc.core + (:require [clojure.spec.alpha :as s] + [orchestra.core :refer [defn-spec]] + [org.domaindrivenarchitecture.activity-pub-poc.spec-helper :as sh] + [org.domaindrivenarchitecture.activity-pub-poc.activitystreams2 :as as])) diff --git a/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/core_test.cljc b/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/core_test.cljc new file mode 100644 index 0000000..7160d1b --- /dev/null +++ b/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/core_test.cljc @@ -0,0 +1,23 @@ +(ns org.domaindrivenarchitecture.activity-pub-poc.core-test + (:require + [clojure.test :refer [deftest is are testing run-tests]] + [clojure.spec.alpha :as s] + [org.domaindrivenarchitecture.activity-pub-poc.core :as sut])) + +(deftest should-serailize + (is (= "{ + \"@context\": \"https://www.w3.org/ns/activitystreams\", + \"summary\": \"Sally liked a note\", + \"type\": \"Like\", + \"actor\": { + \"type\": \"Person\", + \"name\": \"Sally\" + }, + \"object\": \"http://example.org/notes/1\" +}" + (sut/serialize + {:summary "Sally liked a note", + :type "Like", + :actor {:type "Person", + :name "Sally"}, + :object "http://example.org/notes/1"})))) \ No newline at end of file