Compare commits
No commits in common. "4ee310596a9898bb226f9e52d796f32dda841df9" and "72a51b3f2c4c954121e8a5cb8955a86338936e79" have entirely different histories.
4ee310596a
...
72a51b3f2c
2 changed files with 2 additions and 36 deletions
|
@ -29,7 +29,7 @@
|
||||||
(s/and
|
(s/and
|
||||||
::owl/Class
|
::owl/Class
|
||||||
::Object
|
::Object
|
||||||
(sh/map-spec (s/keys :opt-un [::result ::object ::actor]))))
|
(sh/map-spec (s/keys :opt-un [::result ::object]))))
|
||||||
|
|
||||||
;http://www.w3.org/ns/activitystreams#Relationship
|
;http://www.w3.org/ns/activitystreams#Relationship
|
||||||
;We only have this class, since the property "object" is in the domain "Activity" and "Relationship"
|
;We only have this class, since the property "object" is in the domain "Activity" and "Relationship"
|
||||||
|
@ -67,6 +67,7 @@
|
||||||
any?;::xsd/anyURI
|
any?;::xsd/anyURI
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
;http://www.w3.org/ns/activitystreams#result
|
;http://www.w3.org/ns/activitystreams#result
|
||||||
(s/def ::result
|
(s/def ::result
|
||||||
(s/and
|
(s/and
|
||||||
|
@ -81,11 +82,3 @@
|
||||||
::owl/Class
|
::owl/Class
|
||||||
::Object
|
::Object
|
||||||
::Link))
|
::Link))
|
||||||
|
|
||||||
;http://www.w3.org/ns/activitystreams#actor
|
|
||||||
(s/def ::actor
|
|
||||||
(s/and
|
|
||||||
::owl/ObjectProperty
|
|
||||||
::owl/Class
|
|
||||||
::Object
|
|
||||||
::Link))
|
|
||||||
|
|
|
@ -34,30 +34,3 @@
|
||||||
[{:type "Image",
|
[{:type "Image",
|
||||||
:content "This is what he looks like.",
|
:content "This is what he looks like.",
|
||||||
:url "http://example.org/cat.jpeg"}])))
|
:url "http://example.org/cat.jpeg"}])))
|
||||||
|
|
||||||
(deftest actor-test
|
|
||||||
(is (s/valid? ::sut/actor "http://sally.example.org"))
|
|
||||||
(is (s/valid? ::sut/actor {:type "Person",
|
|
||||||
:id "http://sally.example.org",
|
|
||||||
:summary "Sally"}))
|
|
||||||
(is (s/valid? ::sut/actor ["http://joe.example.org",
|
|
||||||
{:type "Person",
|
|
||||||
:id "http://sally.example.org",
|
|
||||||
:name "Sally"}])))
|
|
||||||
|
|
||||||
(deftest Activity-test
|
|
||||||
(is (s/valid? ::sut/Activity
|
|
||||||
{:type "Activity",
|
|
||||||
:summary "Sally did something to a note",
|
|
||||||
:actor {:type "Person",
|
|
||||||
:name "Sally"},
|
|
||||||
:object {:type "Note",
|
|
||||||
:name "A Note"}})))
|
|
||||||
|
|
||||||
(deftest Like-test
|
|
||||||
(is (s/valid? ::sut/Like
|
|
||||||
{:summary "Sally liked a note",
|
|
||||||
:type "Like",
|
|
||||||
:actor {:type "Person",
|
|
||||||
:name "Sally"},
|
|
||||||
:object "http://example.org/notes/1"})))
|
|
||||||
|
|
Loading…
Reference in a new issue