ActivityPub § 5.4 Following Collection:
Every actor SHOULD have a following collection. This is a list of everybody that the actor has followed, added as a side effect. The following collection MUST be either an OrderedCollection or a Collection
This is a Test Case describing a rule to determine whether an ActivityPub Object is in partial conformance with the following behaviors required by ActivityPub.
The identifier of this test is urn:uuid:018c3e17-a1bd-7040-8007-4cd3b9063288.
The subject of this test is an ActivityPub Actor Object.
This test requires the following inputs indicating parts of the test subject:
object - the object whose following property will be tested
This test applies to each of the following collections derived from the values of the property on object named following.
object is a JSON objectobject JSON object has a property named followingtargets be a setfollowingValues be the result of
object.following is an Array, return itobject.followingfollowingValues
targetstargetstargetsFor every target target
target is a JSON objecttarget has a property named typetarget's type property must be one of
What follows are some specific cases of applything this test.
inputs
object:
{
"following": {
"type": "Collection"
}
}
test targets
{
"type": "Collection"
}
passedinputs
object:
{
"following": {
"type": "OrderedCollection"
}
}
test targets
{
"type": "OrderedCollection"
}
passedinputs
object:
{
"following": {
"type": ["FancyCollection", "OrderedCollection"]
}
}
test targets
{
"type": ["FancyCollection", "OrderedCollection"]
}
passed
"FancyCollection" is not well-defined here,
but this object still passes the test because at least one of the type
property values is OrderedCollection and thus satisfies the requirement
as interpreted.inputs
object:
{
"following": 1
}
test targets
1
failedinputs
object:
{
"following": {}
}
test targets
{}
failed"Link"inputs
object:
{
"following": {
"type": ["Link"]
}
}
test targets
{
"type": ["Link"]
}
failedinputs
object:
1
result
inapplicableinputs
object:
{ "foo": "bar" }
result
inapplicableoutcomeAn outcome is a conclusion that comes from evaluating a test on a test subject. An outcome can be one of the three following types:
inapplicable: No part of the test subject matches the applicabilitypassed: A test target meets all expectationsfailed: A test target does not meet all expectationspassed, the requirement is satisfied by the test subjectfailed, the requirement is not satisfied by the test subjectinapplicable, further testing is needed to determine requirement satisfaction