test first for core-serialize
This commit is contained in:
parent
774cc4338d
commit
0e00da5c9a
2 changed files with 28 additions and 0 deletions
|
@ -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]))
|
|
@ -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"}))))
|
Loading…
Reference in a new issue