aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick/UserTest.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-08-22 08:31:49 +0300
committerGravatar Vitaly Takmazov2021-08-22 08:31:49 +0300
commiteb93d08061e2220af8036aea00cf163204953059 (patch)
treea70dce02fe415b663fa824b8bd59351d010498f9 /src/test/java/com/juick/UserTest.java
parent21010f01250e6bf9a3247e4922f88f13568fc959 (diff)
ActivityPub: make Mastodon happy with hashtags
Diffstat (limited to 'src/test/java/com/juick/UserTest.java')
-rw-r--r--src/test/java/com/juick/UserTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/java/com/juick/UserTest.java b/src/test/java/com/juick/UserTest.java
index 6c0cdb88..df89bb5b 100644
--- a/src/test/java/com/juick/UserTest.java
+++ b/src/test/java/com/juick/UserTest.java
@@ -20,6 +20,7 @@ package com.juick;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.juick.model.User;
import com.juick.test.util.MockUtils;
+import com.juick.www.api.activity.model.objects.Hashtag;
import com.juick.www.api.activity.model.objects.Mention;
import org.junit.jupiter.api.Test;
@@ -39,8 +40,11 @@ public class UserTest {
assertEquals(ugnich, jsonUgnich);
}
@Test
- public void mentionFormat() {
+ public void linkFormat() {
Mention mention = new Mention("https://example.com/users/test", "testuser");
+ assertEquals("Mention", mention.getType());
assertEquals("@testuser@example.com", mention.getName());
+ Hashtag tag = new Hashtag("https://example.com/t/test", "testtag");
+ assertEquals("testtag", tag.getName());
}
}