add a like test for a repository star
This commit is contained in:
parent
5d8f08488f
commit
5a7a6653ab
3 changed files with 21 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
|||
(ns org.domaindrivenarchitecture.fed-poc.forge
|
||||
(ns org.domaindrivenarchitecture.fed-poc.forgefed
|
||||
(:require [clojure.spec.alpha :as s]
|
||||
[orchestra.core :refer [defn-spec]]
|
||||
[org.domaindrivenarchitecture.fed-poc.spec-helper :as sh]
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
::sut/name "A Note"}})))
|
||||
|
||||
(deftest Like-test
|
||||
(testing "likes for mastodon notes"
|
||||
(is (s/valid? ::sut/Like
|
||||
{::sut/summary "Sally liked a note",
|
||||
::sut/type "Like",
|
||||
|
@ -90,6 +91,12 @@
|
|||
::sut/type "Like",
|
||||
::sut/actor "https://social.bla/alyssa",
|
||||
::sut/object "http://example.org/notes/1"})))
|
||||
(testing "likes for forgejo repositories"
|
||||
(is (s/valid? ::sut/Like
|
||||
{::sut/type "Like",
|
||||
::sut/actor "https://repo.prod.meissa.de/jem",
|
||||
::sut/object "https://codeberg.org/forgejo/forgejo.git"})))
|
||||
)
|
||||
|
||||
(deftest Object-test
|
||||
(is (s/valid? ::sut/Object
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
(ns org.domaindrivenarchitecture.fed-poc.forge-test
|
||||
(ns org.domaindrivenarchitecture.fed-poc.forgefed-test
|
||||
(:require
|
||||
[clojure.test :refer [deftest is are testing run-tests]]
|
||||
[clojure.spec.alpha :as s]
|
||||
[org.domaindrivenarchitecture.fed-poc.security :as sec]
|
||||
[org.domaindrivenarchitecture.fed-poc.activitystreams2 :as as]
|
||||
[org.domaindrivenarchitecture.fed-poc.forge :as sut]))
|
||||
[org.domaindrivenarchitecture.fed-poc.forgefed :as sut]))
|
||||
|
||||
(deftest Repository-test
|
||||
(is (s/valid? ::sut/Repository
|
||||
|
|
Loading…
Reference in a new issue