Implement simple test

This commit is contained in:
erik 2023-06-22 15:45:38 +02:00
parent cc641bfe7f
commit 4bf90ae278

View file

@ -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)))
(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))))