Implement simple test
This commit is contained in:
parent
cc641bfe7f
commit
4bf90ae278
1 changed files with 19 additions and 4 deletions
|
@ -1,6 +1,21 @@
|
||||||
(ns org.domaindrivenarchitecture.activity-pub-poc.core-test
|
(ns org.domaindrivenarchitecture.activity-pub-poc.core-test
|
||||||
(:require [clojure.test :refer :all]
|
(:require
|
||||||
[org.domaindrivenarchitecture.activity-pub-poc.core :as sut]))
|
[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
|
(st/instrument `sut/generate-like-map)
|
||||||
(is (= 0 1)))
|
|
||||||
|
(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))))
|
Loading…
Reference in a new issue