diff options
author | Vitaly Takmazov | 2018-10-08 15:37:48 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-11-29 12:07:00 +0300 |
commit | 7647ea6728e9203787dff4f640acb4d6ce3a704f (patch) | |
tree | 3afe9a6cb1f1cc16c6fea79c798567ed911bb8cd /src/test | |
parent | 55cf2dd357088d7bbe0efff6a483679301ab2c22 (diff) |
save ActivityPub likes
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 2 | ||||
-rw-r--r-- | src/test/resources/like.json | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 09b7d4dd..3e4fe539 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -36,6 +36,7 @@ import com.juick.server.api.activity.model.Context; import com.juick.server.api.activity.model.activities.Create; import com.juick.server.api.activity.model.activities.Delete; import com.juick.server.api.activity.model.activities.Follow; +import com.juick.server.api.activity.model.activities.Like; import com.juick.server.api.activity.model.activities.Undo; import com.juick.server.api.activity.model.objects.Note; import com.juick.server.api.activity.model.objects.Person; @@ -1742,6 +1743,7 @@ public class ServerTests { jsonMapper.readValue(IOUtils.toString(new ClassPathResource("webfinger.json").getURI(), StandardCharsets.UTF_8), Account.class); NodeInfo info = jsonMapper.readValue(IOUtils.toString(new ClassPathResource("xnodeinfo2.json").getURI(), StandardCharsets.UTF_8), NodeInfo.class); assertThat(info.getUsage().getUsers().getActiveHalfyear(), is(42)); + Like like = jsonMapper.readValue(IOUtils.toString(new ClassPathResource("like.json").getURI(), StandardCharsets.UTF_8), Like.class); } @Test public void activitySerialization() throws Exception { diff --git a/src/test/resources/like.json b/src/test/resources/like.json new file mode 100644 index 00000000..47fcd3a8 --- /dev/null +++ b/src/test/resources/like.json @@ -0,0 +1 @@ +{"type":"Like","id":"https://quey.org/users/pazan#likes/63544","actor":"https://quey.org/users/pazan","object":"https://juick.com/n/2928290-0","type":"Like","@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1",{"manuallyApprovesFollowers":"as:manuallyApprovesFollowers","sensitive":"as:sensitive","movedTo":{"@id":"as:movedTo","@type":"@id"},"Hashtag":"as:Hashtag","ostatus":"http://ostatus.org#","atomUri":"ostatus:atomUri","inReplyToAtomUri":"ostatus:inReplyToAtomUri","conversation":"ostatus:conversation","toot":"http://joinmastodon.org/ns#","Emoji":"toot:Emoji","focalPoint":{"@container":"@list","@id":"toot:focalPoint"},"featured":{"@id":"toot:featured","@type":"@id"},"schema":"http://schema.org#","PropertyValue":"schema:PropertyValue","value":"schema:value"}]}
\ No newline at end of file |